Skip to content

Commit 931dac8

Browse files
committed
add super#^.init^# test for static methods
1 parent 45c9038 commit 931dac8

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

test/IDE/complete_after_super.swift

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@
8080
// RUN: %FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt
8181

8282
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_FUNC_SUPER_NODOT > %t.super.txt
83-
// RUN: %FileCheck %s -check-prefix=CLASS_FUNC_SUPER_NODOT < %t.super.txt
83+
// RUN: %FileCheck %s -check-prefix=CLASS_FUNC_SUPER < %t.super.txt
8484

85+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_FUNC_SUPER_DOT > %t.super.txt
86+
// RUN: %FileCheck %s -check-prefix=CLASS_FUNC_SUPER < %t.super.txt
8587

8688
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_1 > %t.super.txt
8789
// RUN: %FileCheck %s -check-prefix=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_1 < %t.super.txt
@@ -440,11 +442,16 @@ class SuperDerivedB : SuperBaseB {
440442

441443
class func test3() {
442444
super#^CLASS_FUNC_SUPER_NODOT^#
445+
}
446+
class func test4() {
447+
super.#^CLASS_FUNC_SUPER_DOT^#
448+
}
449+
class func test5() {
443450
super(#^CLASS_FUNC_SUPER_PAREN^#
444-
445-
// CLASS_FUNC_SUPER_NODOT: Decl[Constructor]/CurrNominal: .init()[#SuperBaseB#]
446-
// CLASS_FUNC_SUPER_NODOT: Decl[Constructor]/CurrNominal: .init({#a: Double#})[#SuperBaseB#]
447-
// CLASS_FUNC_SUPER_NODOT: Decl[Constructor]/CurrNominal: .init({#int: Int#})[#SuperBaseB#]
451+
}
452+
// CLASS_FUNC_SUPER: Decl[Constructor]/CurrNominal: {{.init|init}}()[#SuperBaseB#]
453+
// CLASS_FUNC_SUPER: Decl[Constructor]/CurrNominal: {{.init|init}}({#a: Double#})[#SuperBaseB#]
454+
// CLASS_FUNC_SUPER: Decl[Constructor]/CurrNominal: {{.init|init}}({#int: Int#})[#SuperBaseB#]
448455
}
449456
}
450457

0 commit comments

Comments
 (0)