Skip to content

Commit 559ad71

Browse files
committed
Add test for compatibility
1 parent 182faa7 commit 559ad71

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/Compatibility/dot_keywords.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %target-typecheck-verify-swift -swift-version 3
2+
3+
// Static function in protocol should have `Self.` instead of its protocol name
4+
protocol P {}
5+
6+
extension P {
7+
static func f1() {}
8+
9+
func g() {
10+
f1() // expected-error {{use of unresolved identifier 'f1'}}
11+
}
12+
}
13+

0 commit comments

Comments
 (0)