File tree Expand file tree Collapse file tree 2 files changed +6
-23
lines changed Expand file tree Collapse file tree 2 files changed +6
-23
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11// RUN: %empty-directory(%t)
22// RUN: %target-build-swift -I %swift-host-lib-dir -L %swift-host-lib-dir -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/syntax_macro_definitions.swift -g -no-toolchain-stdlib-rpath
33// RUNx: %target-swift-frontend -dump-ast -enable-experimental-feature Macros -load-plugin-library %t/%target-library-name(MacroDefinition) -I %swift-host-lib-dir %s -module-name MacroUser 2>&1 | %FileCheck --check-prefix CHECK-AST %s
4- // RUN: %target-build-swift -enable-experimental-feature Macros -load-plugin-library %t/%target-library-name(MacroDefinition) -I %swift-host-lib-dir -L %swift-host-lib-dir %s -o %t/main -module-name MacroUser
4+ // RUN: %target-build-swift -enable-experimental-feature Macros -enable-experimental-feature Macros - load-plugin-library %t/%target-library-name(MacroDefinition) -I %swift-host-lib-dir -L %swift-host-lib-dir %s -o %t/main -module-name MacroUser
55// RUN: %target-run %t/main | %FileCheck %s
66// REQUIRES: executable_test
77
1010
1111macro customFileID: String = MacroDefinition. FileIDMacro
1212macro stringify< T> ( _ value: T ) -> ( T , String ) = MacroDefinition . StringifyMacro
13+ macro fileID< T: _ExpressibleByStringLitera > : T = MacroDefinition. FileIDMacro
1314
1415func testFileID( a: Int , b: Int ) {
1516 // CHECK: MacroUser/macro_external_exec.swift
1617 print ( " Result is \( #customFileID) " )
18+
19+ // CHECK: Builtin result is MacroUser/macro_external_exec.swift
20+ // CHECK-AST: macro_expansion_expr type='String'{{.*}}name=line
21+ print( " Builtin result is \( #fileID) " )
1722}
1823
1924testFileID ( a: 1 , b: 2 )
You can’t perform that action at this time.
0 commit comments