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() {
795795
796796 let _: KeyPath < S , Int > = \. foo // expected-error {{key path cannot refer to instance method 'foo()'}}
797797 // 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'}}
799800 let _ = \S . Type. bar // expected-error {{key path cannot refer to static method 'bar()'}}
800801
801802 struct A {
@@ -808,7 +809,7 @@ func test_keypath_with_method_refs() {
808809 }
809810
810811 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()'}}
812813 let _ = \A . foo. bar // expected-error {{key path cannot refer to instance method 'foo()'}}
813814 let _ = \A . Type. faz. bar // expected-error {{key path cannot refer to static method 'faz()'}}
814815}
You can’t perform that action at this time.
0 commit comments