Files
swift-mirror/test/expr/capture/nested.swift
Michael Gottesman 791d07d379 Revert "Test fixes"
This reverts commit 9c328a81d1.
2025-02-06 14:04:28 -08:00

13 lines
474 B
Swift

// RUN: %target-swift-frontend -dump-ast %s | %FileCheck %s
// CHECK: func_decl{{.*}}"foo2(_:)"
func foo2(_ x: Int) -> (Int) -> (Int) -> Int {
// CHECK: closure_expr type="(Int) -> (Int) -> Int" {{.*}} discriminator=0 nonisolated captures=(x)
return {(bar: Int) -> (Int) -> Int in
// CHECK: closure_expr type="(Int) -> Int" {{.*}} discriminator=0 nonisolated captures=(x<direct>, bar<direct>)
return {(bas: Int) -> Int in
return x + bar + bas
}
}
}