File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 55
55
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_IIFE_2 | %FileCheck %s -check-prefix=IN_IIFE_1
56
56
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_IIFE_3 | %FileCheck %s -check-prefix=IN_IIFE_1
57
57
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_IIFE_4 | %FileCheck %s -check-prefix=IN_IIFE_1
58
+ // RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ERROR_IN_CLOSURE_IN_INITIALIZER | %FileCheck %s -check-prefix=ERROR_IN_CLOSURE_IN_INITIALIZER
58
59
59
60
// ERROR_COMMON: found code completion token
60
61
// ERROR_COMMON-NOT: Begin completions
@@ -369,3 +370,22 @@ func testIIFE() {
369
370
// IN_IIFE_1: Begin completions
370
371
// IN_IIFE_1-DAG: Decl[EnumElement]/ExprSpecific: north[#SomeEnum#]
371
372
// IN_IIFE_1-DAG: Decl[EnumElement]/ExprSpecific: south[#SomeEnum#]
373
+
374
+ extension Error {
375
+ var myErrorNumber : Int { return 0 }
376
+ }
377
+
378
+ class C {
379
+ var foo : String = {
380
+ do {
381
+ } catch {
382
+ error. #^ERROR_IN_CLOSURE_IN_INITIALIZER^#
383
+ // ERROR_IN_CLOSURE_IN_INITIALIZER: Begin completions
384
+ // ERROR_IN_CLOSURE_IN_INITIALIZER-DAG: Keyword[self]/CurrNominal: self[#Error#]; name=self
385
+ // ERROR_IN_CLOSURE_IN_INITIALIZER-DAG: Decl[InstanceVar]/CurrNominal: myErrorNumber[#Int#]; name=myErrorNumber
386
+ // ERROR_IN_CLOSURE_IN_INITIALIZER: End completions
387
+ }
388
+ return " "
389
+ } ( )
390
+ }
391
+
You can’t perform that action at this time.
0 commit comments