File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -795,7 +795,8 @@ func test_keypath_with_method_refs() {
795
795
796
796
let _: KeyPath < S , Int > = \. foo // expected-error {{key path cannot refer to instance method 'foo()'}}
797
797
// expected-error@-1 {{key path value type '() -> Int' cannot be converted to contextual type 'Int'}}
798
- let _: KeyPath < S , Int > = \. bar // expected-error {{key path cannot refer to static member 'bar()'}}
798
+ let _: KeyPath < S , Int > = \. bar // expected-error {{key path cannot refer to static method 'bar()'}}
799
+ // expected-error@-1 {{key path value type '() -> Int' cannot be converted to contextual type 'Int'}}
799
800
let _ = \S . Type. bar // expected-error {{key path cannot refer to static method 'bar()'}}
800
801
801
802
struct A {
@@ -808,7 +809,7 @@ func test_keypath_with_method_refs() {
808
809
}
809
810
810
811
let _: KeyPath < A , Int > = \. foo. bar // expected-error {{key path cannot refer to instance method 'foo()'}}
811
- let _: KeyPath < A , Int > = \. faz. bar // expected-error {{key path cannot refer to static member 'faz()'}}
812
+ let _: KeyPath < A , Int > = \. faz. bar // expected-error {{key path cannot refer to static method 'faz()'}}
812
813
let _ = \A . foo. bar // expected-error {{key path cannot refer to instance method 'foo()'}}
813
814
let _ = \A . Type. faz. bar // expected-error {{key path cannot refer to static method 'faz()'}}
814
815
}
You can’t perform that action at this time.
0 commit comments