|
9 | 9 | // RUN: %FileCheck %s < %t/Macros.swiftinterface --check-prefix CHECK |
10 | 10 | // RUN: %target-swift-frontend -compile-module-from-interface %t/Macros.swiftinterface -o %t/Macros.swiftmodule |
11 | 11 |
|
12 | | -// CHECK: #if compiler(>=5.3) && $Macros |
13 | | -// CHECK-NEXT: #if $FreestandingExpressionMacros |
| 12 | +// CHECK: #if compiler(>=5.3) && $Macros && $FreestandingExpressionMacros |
14 | 13 | // CHECK-NEXT: @freestanding(expression) public macro publicStringify<T>(_ value: T) -> (T, Swift.String) = #externalMacro(module: "SomeModule", type: "StringifyMacro") |
15 | | -// CHECK-NEXT: #else |
16 | | -// CHECK-NEXT: @expression public macro publicStringify<T>(_ value: T) -> (T, Swift.String) = #externalMacro(module: "SomeModule", type: "StringifyMacro") |
17 | | -// CHECK-NEXT: #endif |
18 | 14 | // CHECK-NEXT: #endif |
19 | 15 | @freestanding(expression) public macro publicStringify<T>(_ value: T) -> (T, String) = #externalMacro(module: "SomeModule", type: "StringifyMacro") |
20 | 16 |
|
21 | 17 | @freestanding(expression) public macro labeledStringify<T>(_ value: T, label: String) -> (T, String) = #externalMacro(module: "SomeModule", type: "StringifyMacro") |
22 | 18 |
|
| 19 | +// CHECK: #if compiler(>=5.3) && $Macros && $FreestandingExpressionMacros |
23 | 20 | // CHECK: @freestanding(expression) public macro unlabeledStringify<T>(_ value: T, label: Swift.String) -> (T, Swift.String) = #labeledStringify(value, label: "default label") |
| 21 | +// CHECK-NEXT: #endif |
24 | 22 | @freestanding(expression) public macro unlabeledStringify<T>(_ value: T, label: String) -> (T, String) = #labeledStringify(value, label: "default label") |
25 | 23 |
|
26 | | -// CHECK: #if compiler(>=5.3) && $Macros |
27 | | -// CHECK-NEXT: #if $FreestandingExpressionMacros |
| 24 | +// CHECK: #if compiler(>=5.3) && $Macros && $FreestandingExpressionMacros |
28 | 25 | // CHECK: @freestanding(expression) public macro publicLine<T>() -> T = #externalMacro(module: "SomeModule", type: "Line") where T : Swift.ExpressibleByIntegerLiteral |
29 | | -// CHECK-NEXT: #else |
30 | | -// CHECK: @expression public macro publicLine<T>() -> T = #externalMacro(module: "SomeModule", type: "Line") where T : Swift.ExpressibleByIntegerLiteral |
31 | | -// CHECK-NEXT: #endif |
32 | 26 | // CHECK-NEXT: #endif |
33 | 27 | @freestanding(expression) public macro publicLine<T: ExpressibleByIntegerLiteral>() -> T = #externalMacro(module: "SomeModule", type: "Line") |
34 | 28 |
|
|
0 commit comments