Skip to content

Commit 87e9349

Browse files
committed
[Test] Add a test case for https://bugs.swift.org/browse/SR-12728
rdar://problem/62895098
1 parent 9044aa0 commit 87e9349

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/Frontend/dump-parse.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,22 @@ enum MyEnum {
104104
// CHECK-NEXT: (parameter "v"))
105105
// CHECK-NEXT: (brace_stmt range=[{{.+}}])))))
106106
_ = { (v: MyEnum) in }
107+
108+
// CHECK-LABEL: (struct_decl range=[{{.+}}] "SelfParam"
109+
struct SelfParam {
110+
111+
// CHECK-LABEL: (func_decl range=[{{.+}}] "createOptional()" type
112+
// CHECK-NEXT: (parameter "self")
113+
// CHECK-NEXT: (parameter_list range=[{{.+}}])
114+
// CHECK-NEXT: (result
115+
// CHECK-NEXT: (type_optional
116+
// CHECK-NEXT: (type_ident
117+
// CHECK-NEXT: (component id='SelfParam' bind=none))))
118+
static func createOptional() -> SelfParam? {
119+
120+
// CHECK-LABEL: (call_expr type='<null>' arg_labels=
121+
// CHECK-NEXT: (unresolved_decl_ref_expr type='<null>' name=SelfParam function_ref=unapplied)
122+
// CHECK-NEXT: (tuple_expr type='()'{{.*}}))
123+
SelfParam()
124+
}
125+
}

0 commit comments

Comments
 (0)