mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
321 B
Swift
15 lines
321 B
Swift
// RUN: %target-swift-frontend -dump-ast %s | %FileCheck %s
|
|
|
|
struct B {
|
|
static var _none: B { B() }
|
|
}
|
|
|
|
struct A {
|
|
init(_ other: B) {}
|
|
// CHECK: constructor_decl{{.*}}interface_type="(A.Type) -> (B?) -> A"
|
|
init(_ other: B?) {
|
|
// CHECK: dot_syntax_call_expr type="(B) -> A"
|
|
self.init(other ?? ._none)
|
|
}
|
|
}
|