We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Swift 5.3 via Xcode 12.2 RC
md5: fccd1261912dc319d8850228a7fdeffa
Issue Description:
The following code is invalid because the invocation of build is invalid, but it crashes the compiler:
build
protocol Thing { associatedtype Foo associatedtype Bar } struct AnyThing<Foo, Bar>: Thing {} enum Either<A, B> { case first(A) case second(B) } @_functionBuilder struct ThingBuilder { public static func buildEither<A, B>(first value: A) -> Either<A, B> where A: Thing, B: Thing { .first(value) } public static func buildEither<A, B>(second value: B) -> Either<A, B> where A: Thing, B: Thing { .second(value) } } func build<A>(@ThingBuilder block: () -> A) -> A where A: Thing { block() } let x = build { if Bool.random() { AnyThing<Int, Int>() } else { AnyThing() } }
The text was updated successfully, but these errors were encountered:
@swift-ci create
Sorry, something went wrong.
Hi @stephencelis, could you please verify that this crash has been fixed in main branch? I have tried with snapshot from 11/09 and it didn't crash.
stephencelis
No branches or pull requests
Environment
Swift 5.3 via Xcode 12.2 RC
Additional Detail from JIRA
md5: fccd1261912dc319d8850228a7fdeffa
Issue Description:
The following code is invalid because the invocation of
build
is invalid, but it crashes the compiler:The text was updated successfully, but these errors were encountered: