New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-7976] Unexpected behavior from conditional conformances #50510
Comments
This works (as in, fails to compile with a vaguely reasonable error message) without the conformance:
|
@swift-ci create |
@huonw for some reason your code does compile without an error in Swift playground and prints `Int` and `String`. Edit: Sorry I misunderstood the error message, it's correct. |
Could this be related to SR-5440? |
Then maybe this is related to SR-7605 too? And maybe it's also affecting generic type parameters as in the example of my comment there? |
#17168 fixes this when the types are used in expressions, but there's no error if they're used in decls, e.g. It could very well be related to SR-7605, and the fix for this might fix that one too, but associated type inference is a complicated beast at the moment, so I would (unfortunately) guess it won't be quite that simple. |
OK, thanks! |
Both of these rightly raise errors with the latest snapshot, in expression and type identifier positions. |
Fixed by Slava alongside SR-5440 |
Environment
Discovered with:
Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1)
Also present in: 4.2 (first WWDC Xcode 10 build)
Additional Detail from JIRA
md5: 50305cd36c55a0b42c3ff7ecf67477f3
relates to:
Issue Description:
The following code snippets presents two issues discovered with conditional conformances:
1. First issue is wrong type resolution.
2. Second issue is a successful conditional conformance where it should have failed.
The text was updated successfully, but these errors were encountered: