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 implementation type 'MyMacros.StringifyMacro' could not be found for macro 'stringify'}}
22
+
// expected-note@-2{{'stringify' declared here}}
14
23
15
24
@m1structX1{}
16
25
@@ -29,3 +38,29 @@ struct SkipNestedType {
29
38
@m1varx:Int=0
30
39
// expected-error@-1{{external macro implementation type 'MyMacros.Macro1' could not be found for macro 'm1()'; the type must be public and provided via '-load-plugin-library'}}
31
40
}
41
+
42
+
structTestMacroArgs{
43
+
@m1("extra arg")structArgs1{} // expected-error{{argument passed to call that takes no arguments}}
44
+
45
+
@m2(10)structArgs2{}
46
+
47
+
@m2(10.0)structArgs3{}
48
+
49
+
@m2("")structArgs4{} // expected-error{{no exact matches in call to macro 'm2'}}
50
+
51
+
@m2(Nested.x)structArgs5{}
52
+
53
+
structNested{
54
+
staticletx=10
55
+
56
+
@m2(x)structArgs1{}
57
+
58
+
@m2(Nested.x)structArgs2{}
59
+
}
60
+
61
+
@m3(message:stringify(Nested.x).1)structArgs6{}
62
+
// expected-error@-1{{expansion of macro 'stringify' requires leading '#'}}
63
+
64
+
@m3(message: #stringify(Nested.x).1)structArgs7{}
65
+
// expected-error@-1{{external macro implementation type 'MyMacros.StringifyMacro' could not be found for macro 'stringify'}}
0 commit comments