@@ -95,11 +95,11 @@ func testNotWeakDeclDiagnostics(_ s: LocalStruct) {
95
95
96
96
func testInvalidExpressionsDiagnostics( ) {
97
97
if #_hasSymbol( unknownDecl) { } // expected-error {{cannot find 'unknownDecl' in scope}}
98
- if #_hasSymbol( noArgFunc ( ) ) { } // expected-error {{#_hasSymbol condition must refer to a declaration}}
99
- if #_hasSymbol( global - 1 ) { } // expected-error {{#_hasSymbol condition must refer to a declaration}}
100
- if #_hasSymbol( S . staticFunc ( ) ) { } // expected-error {{#_hasSymbol condition must refer to a declaration}}
101
- if #_hasSymbol( C . classFunc ( ) ) { } // expected-error {{#_hasSymbol condition must refer to a declaration}}
102
- if #_hasSymbol( 1 as Int ) { } // expected-error {{#_hasSymbol condition must refer to a declaration}}
98
+ if #_hasSymbol( noArgFunc ( ) ) { } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
99
+ if #_hasSymbol( global - 1 ) { } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
100
+ if #_hasSymbol( S . staticFunc ( ) ) { } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
101
+ if #_hasSymbol( C . classFunc ( ) ) { } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
102
+ if #_hasSymbol( 1 as Int ) { } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
103
103
if #_hasSymbol( 1 as S ) { } // expected-error {{cannot convert value of type 'Int' to type 'S' in coercion}}
104
104
}
105
105
@@ -127,11 +127,11 @@ func testClosure() {
127
127
doIt { if #_hasSymbol( ambiguousFunc) { } } // expected-error {{ambiguous use of 'ambiguousFunc()'}}
128
128
doIt { if #_hasSymbol( localFunc) { } } // expected-warning {{global function 'localFunc()' is not a weakly linked declaration}}
129
129
doIt { if #_hasSymbol( unknownDecl) { } } // expected-error {{cannot find 'unknownDecl' in scope}}
130
- doIt { if #_hasSymbol( noArgFunc ( ) ) { } } // expected-error {{#_hasSymbol condition must refer to a declaration}}
131
- doIt { if #_hasSymbol( global - 1 ) { } } // expected-error {{#_hasSymbol condition must refer to a declaration}}
132
- doIt { if #_hasSymbol( S . staticFunc ( ) ) { } } // expected-error {{#_hasSymbol condition must refer to a declaration}}
133
- doIt { if #_hasSymbol( C . classFunc ( ) ) { } } // expected-error {{#_hasSymbol condition must refer to a declaration}}
134
- doIt { if #_hasSymbol( 1 as Int ) { } } // expected-error {{#_hasSymbol condition must refer to a declaration}}
130
+ doIt { if #_hasSymbol( noArgFunc ( ) ) { } } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
131
+ doIt { if #_hasSymbol( global - 1 ) { } } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
132
+ doIt { if #_hasSymbol( S . staticFunc ( ) ) { } } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
133
+ doIt { if #_hasSymbol( C . classFunc ( ) ) { } } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
134
+ doIt { if #_hasSymbol( 1 as Int ) { } } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
135
135
doIt { if #_hasSymbol( 1 as S ) { } } // expected-error {{cannot convert value of type 'Int' to type 'S' in coercion}}
136
136
}
137
137
@@ -164,7 +164,7 @@ struct MyView {
164
164
}
165
165
166
166
@ViewBuilder var noArgFuncView : some View {
167
- if #_hasSymbol( noArgFunc ( ) ) { image } // expected-error {{#_hasSymbol condition must refer to a declaration}}
167
+ if #_hasSymbol( noArgFunc ( ) ) { image } // expected-error {{' #_hasSymbol' condition must refer to a declaration}}
168
168
else { image }
169
169
}
170
170
}
0 commit comments