mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This time, the issue is that TypeNullifier skips bodies of multi-statement closures. However, ExprRewriter will type happily pass them on to typeCheckClosureBody(). This could trigger assertions. Fix this by skipping type checking of multi-statement closures when diagnosing. There seems to be a minor QoI regression in some test cases that already looked pretty dodgy and/or had FIXMEs. However I think its worth fixing a crash.
8 lines
356 B
Swift
8 lines
356 B
Swift
// RUN: not %target-swift-frontend %s -parse
|
|
|
|
// Distributed under the terms of the MIT license
|
|
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
|
|
// Test case found by fuzzing
|
|
|
|
let:{{class B{struct S{let b=[Void{func a{struct Q{class d{struct S{class a{enum E<T where B:a{struct B{{}struct B<g{class B{class d{var _=B
|