Skip to content

Commit 7285989

Browse files
committed
Allow the standard library to build with a slightly older compiler
Check for the `@expression` attribute before using it. Fixes rdar://104036723.
1 parent c06216c commit 7285989

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/core/Macros.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#if hasAttribute(expression)
1314
/// Specifies the module and type name for an externally-defined macro, which
1415
/// must conform to the appropriate set of `Macro` protocols.
1516
///
@@ -23,3 +24,4 @@
2324
public macro externalMacro<T>(module: String, type: String) -> T =
2425
Builtin.ExternalMacro
2526

27+
#endif

0 commit comments

Comments
 (0)