mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Macros: Escape init when printing names for attached macros.
Older compilers can't parse `name(init)`. Restore the call to `escapeKeywordInContext()` to ensure special names get escaped. Resolves rdar://108806697
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
@attached(accessor) public macro myWrapper() = #externalMacro(module: "SomeModule", type: "Wrapper")
|
||||
|
||||
// CHECK: #if compiler(>=5.3) && $Macros && $AttachedMacros
|
||||
// CHECK: @attached(member, names: named(init), prefixed(`$`)) public macro MemberwiseInit() -> () = #externalMacro(module: "SomeModule", type: "MemberwiseInitMacro")
|
||||
// CHECK: @attached(member, names: named(`init`), prefixed(`$`)) public macro MemberwiseInit() -> () = #externalMacro(module: "SomeModule", type: "MemberwiseInitMacro")
|
||||
// CHECK-NEXT: #endif
|
||||
@attached(member, names: named(init), prefixed(`$`)) public macro MemberwiseInit() -> () = #externalMacro(module: "SomeModule", type: "MemberwiseInitMacro")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user