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.
18 lines
370 B
Swift
18 lines
370 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
|
|
|
|
{struct A:OptionSetType
|
|
B{struct A
|
|
c{_{
|
|
enum S{class a{
|
|
enum S{
|
|
class d{
|
|
{
|
|
}enum B{struct e{
|
|
{
|
|
}enum b{class c<T where a:a{
|
|
class a{struct A:OptionSetType
|