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
303 B
Swift
8 lines
303 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
|
|
|
|
func a{class A{{}var _=Int{func T{struct e{enum b{struct B{class b{class a{func a<f:f.c
|