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 5555// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_IIFE_2 | %FileCheck %s -check-prefix=IN_IIFE_1
5656// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_IIFE_3 | %FileCheck %s -check-prefix=IN_IIFE_1
5757// 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
5859
5960// ERROR_COMMON: found code completion token
6061// ERROR_COMMON-NOT: Begin completions
@@ -369,3 +370,22 @@ func testIIFE() {
369370// IN_IIFE_1: Begin completions
370371// IN_IIFE_1-DAG: Decl[EnumElement]/ExprSpecific: north[#SomeEnum#]
371372// 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