mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #64840 from DougGregor/macro-lookup-in-types
This commit is contained in:
@@ -335,6 +335,12 @@ func testFreestandingMacroExpansion() {
|
||||
}
|
||||
testFreestandingMacroExpansion()
|
||||
|
||||
// Explicit structs to force macros to be parsed as decl.
|
||||
struct ContainerOfNumberedStructs {
|
||||
#bitwidthNumberedStructs("MyIntOne")
|
||||
#bitwidthNumberedStructs("MyIntTwo")
|
||||
}
|
||||
|
||||
// Avoid re-type-checking declaration macro arguments.
|
||||
@freestanding(declaration)
|
||||
macro freestandingWithClosure<T>(_ value: T, body: (T) -> T) = #externalMacro(module: "MacroDefinition", type: "EmptyDeclarationMacro")
|
||||
|
||||
Reference in New Issue
Block a user