You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// expected-warning@-1{{external macro definitions are now written using #externalMacro}}{{43-68=#externalMacro(module: "MissingModule", type: "MissingType")}}
#missingMacro1("hello") // expected-error{{external macro implementation type 'MissingModule.MissingType' could not be found for macro 'missingMacro1'; the type must be public and provided via '-load-plugin-library'}}
82
101
}
102
+
103
+
@expression macro undefined() // expected-error{{macro 'undefined()' requires a definition}}
Copy file name to clipboardExpand all lines: test/Macros/parsing.swift
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,15 @@ protocol P { }
3
3
protocolQ{associatedtypeAssoc}
4
4
5
5
@expression macro m1: Int = #externalMacro(module:"A", type:"M1")
6
+
// expected-warning@-1{{external macro implementation type 'A.M1' could not be found for macro 'm1'; the type must be public and provided via '-load-plugin-library'}}
// expected-warning@-1{{external macro implementation type 'A.M2' could not be found for macro 'm2'; the type must be public and provided via '-load-plugin-library'}}
// expected-warning@-1{{external macro implementation type 'A.M3' could not be found for macro 'm3(a:)'; the type must be public and provided via '-load-plugin-library'}}
8
11
@expression macro m4<T:Q>: T = #externalMacro(module:"A", type:"M4")where T.Assoc:P
12
+
// expected-warning@-1{{external macro implementation type 'A.M4' could not be found for macro 'm4'; the type must be public and provided via '-load-plugin-library'}}
// expected-warning@-1{{external macro implementation type 'A.M4' could not be found for macro 'm5'; the type must be public and provided via '-load-plugin-library'}}
10
15
11
16
@expression macro m6 = A // expected-error{{expected '(' for macro parameters or ':' for a value-like macro}}
12
17
// expected-error@-1{{macro must itself be defined by a macro expansion such as '#externalMacro(...)'}}
0 commit comments