110
110
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IF_LET_BIND_1 | %FileCheck %s -check-prefix=FOOSTRUCT_DOT_BOOL
111
111
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IF_LET_BIND_2 | %FileCheck %s -check-prefix=FOOSTRUCT_DOT_BOOL
112
112
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IF_LET_BIND_3 | %FileCheck %s -check-prefix=FOOSTRUCT_DOT
113
+ // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IF_LET_BIND_4 | %FileCheck %s -check-prefix=FOOSTRUCT_NODOT
113
114
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GUARD_LET_BIND_1 | %FileCheck %s -check-prefix=FOOSTRUCT_DOT_BOOL
114
115
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GUARD_LET_BIND_2 | %FileCheck %s -check-prefix=FOOSTRUCT_DOT_BOOL
115
116
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GUARD_LET_BIND_3 | %FileCheck %s -check-prefix=FOOSTRUCT_DOT_BOOL
116
117
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GUARD_LET_BIND_4 | %FileCheck %s -check-prefix=FOOSTRUCT_DOT_BOOL
117
118
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GUARD_LET_BIND_5 | %FileCheck %s -check-prefix=FOOSTRUCT_DOT
119
+ // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GUARD_LET_BIND_6 | %FileCheck %s -check-prefix=FOOSTRUCT_NODOT
118
120
119
121
120
122
struct FooStruct {
@@ -582,6 +584,9 @@ func testIfLetBinding2(x: FooStruct?) {
582
584
func testIfLetBinding3 ( x: FooStruct? ) {
583
585
if let y = x, let z = y. #^IF_LET_BIND_3^# { }
584
586
}
587
+ func testIfLetBinding3 ( x: FooStruct? ) {
588
+ if let y = x, let z = y#^IF_LET_BIND_4^# { }
589
+ }
585
590
func testGuardLetBinding1 ( x: FooStruct? ) {
586
591
guard let y = x, y. #^GUARD_LET_BIND_1^# else { }
587
592
}
@@ -597,6 +602,9 @@ func testGuardLetBinding4(x: FooStruct?) {
597
602
func testGuardLetBinding5 ( x: FooStruct? ) {
598
603
guard let y = x, let z = y. #^GUARD_LET_BIND_5^# else { }
599
604
}
605
+ func testGuardLetBinding5( x: FooStruct? ) {
606
+ guard let y = x, z = y#^GUARD_LET_BIND_6^# else { }
607
+ }
600
608
601
609
// FOOSTRUCT_DOT: Begin completions
602
610
// FOOSTRUCT_DOT-DAG: Decl[InstanceVar]/CurrNominal: instanceVar[#Int#];
@@ -609,3 +617,9 @@ func testGuardLetBinding5(x: FooStruct?) {
609
617
// FOOSTRUCT_DOT_BOOL-DAG: Decl[InstanceMethod]/CurrNominal/TypeRelation[Identical]: boolGen()[#Bool#];
610
618
// FOOSTRUCT_DOT_BOOL-DAG: Decl[InstanceMethod]/CurrNominal: intGen()[#Int#];
611
619
// FOOSTRUCT_DOT_BOOL: End completions
620
+
621
+ // FOOSTRUCT_NODOT: Begin completions
622
+ // FOOSTRUCT_NODOT-DAG: Decl[InstanceVar]/CurrNominal: .instanceVar[#Int#];
623
+ // FOOSTRUCT_NODOT-DAG: Decl[InstanceMethod]/CurrNominal: .boolGen()[#Bool#];
624
+ // FOOSTRUCT_NODOT-DAG: Decl[InstanceMethod]/CurrNominal: .intGen()[#Int#];
625
+ // FOOSTRUCT_NODOT: End completions
0 commit comments