mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "[Macros] Treat FreestandingExpressionMacros as a suppressible feature"
This reverts commit b412c6c884.
Resolves rdar://108591384
This commit is contained in:
@@ -9,26 +9,20 @@
|
||||
// RUN: %FileCheck %s < %t/Macros.swiftinterface --check-prefix CHECK
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface %t/Macros.swiftinterface -o %t/Macros.swiftmodule
|
||||
|
||||
// CHECK: #if compiler(>=5.3) && $Macros
|
||||
// CHECK-NEXT: #if $FreestandingExpressionMacros
|
||||
// CHECK: #if compiler(>=5.3) && $Macros && $FreestandingExpressionMacros
|
||||
// CHECK-NEXT: @freestanding(expression) public macro publicStringify<T>(_ value: T) -> (T, Swift.String) = #externalMacro(module: "SomeModule", type: "StringifyMacro")
|
||||
// CHECK-NEXT: #else
|
||||
// CHECK-NEXT: @expression public macro publicStringify<T>(_ value: T) -> (T, Swift.String) = #externalMacro(module: "SomeModule", type: "StringifyMacro")
|
||||
// CHECK-NEXT: #endif
|
||||
// CHECK-NEXT: #endif
|
||||
@freestanding(expression) public macro publicStringify<T>(_ value: T) -> (T, String) = #externalMacro(module: "SomeModule", type: "StringifyMacro")
|
||||
|
||||
@freestanding(expression) public macro labeledStringify<T>(_ value: T, label: String) -> (T, String) = #externalMacro(module: "SomeModule", type: "StringifyMacro")
|
||||
|
||||
// CHECK: #if compiler(>=5.3) && $Macros && $FreestandingExpressionMacros
|
||||
// CHECK: @freestanding(expression) public macro unlabeledStringify<T>(_ value: T, label: Swift.String) -> (T, Swift.String) = #labeledStringify(value, label: "default label")
|
||||
// CHECK-NEXT: #endif
|
||||
@freestanding(expression) public macro unlabeledStringify<T>(_ value: T, label: String) -> (T, String) = #labeledStringify(value, label: "default label")
|
||||
|
||||
// CHECK: #if compiler(>=5.3) && $Macros
|
||||
// CHECK-NEXT: #if $FreestandingExpressionMacros
|
||||
// CHECK: #if compiler(>=5.3) && $Macros && $FreestandingExpressionMacros
|
||||
// CHECK: @freestanding(expression) public macro publicLine<T>() -> T = #externalMacro(module: "SomeModule", type: "Line") where T : Swift.ExpressibleByIntegerLiteral
|
||||
// CHECK-NEXT: #else
|
||||
// CHECK: @expression public macro publicLine<T>() -> T = #externalMacro(module: "SomeModule", type: "Line") where T : Swift.ExpressibleByIntegerLiteral
|
||||
// CHECK-NEXT: #endif
|
||||
// CHECK-NEXT: #endif
|
||||
@freestanding(expression) public macro publicLine<T: ExpressibleByIntegerLiteral>() -> T = #externalMacro(module: "SomeModule", type: "Line")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user