mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Start requiring expression macros to be marked with @expression
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface %t/Macros.swiftinterface -o %t/Macros.swiftmodule
|
||||
|
||||
// CHECK: #if compiler(>=5.3) && $Macros
|
||||
// CHECK-NEXT: public macro publicStringify<T>(_ value: T) -> (T, Swift.String) = SomeModule.StringifyMacro
|
||||
// CHECK-NEXT: @expression public macro publicStringify<T>(_ value: T) -> (T, Swift.String) = SomeModule.StringifyMacro
|
||||
// CHECK-NEXT: #endif
|
||||
public macro publicStringify<T>(_ value: T) -> (T, String) = SomeModule.StringifyMacro
|
||||
@expression public macro publicStringify<T>(_ value: T) -> (T, String) = SomeModule.StringifyMacro
|
||||
|
||||
// CHECK: #if compiler(>=5.3) && $Macros
|
||||
// CHECK: public macro publicLine<T>: T = SomeModule.Line where T : Swift.ExpressibleByIntegerLiteral
|
||||
// CHECK: @expression public macro publicLine<T>: T = SomeModule.Line where T : Swift.ExpressibleByIntegerLiteral
|
||||
// CHECK-NEXT: #endif
|
||||
public macro publicLine<T: ExpressibleByIntegerLiteral>: T = SomeModule.Line
|
||||
@expression public macro publicLine<T: ExpressibleByIntegerLiteral>: T = SomeModule.Line
|
||||
|
||||
// CHECK-NOT: internalStringify
|
||||
macro internalStringify<T>(_ value: T) -> (T, String) = SomeModule.StringifyMacro
|
||||
@expression macro internalStringify<T>(_ value: T) -> (T, String) = SomeModule.StringifyMacro
|
||||
|
||||
Reference in New Issue
Block a user