mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The original module names themselves must still be valid unescaped identifiers; most of the serialization logic in the compiler depends on the name of a module matching its name on the file system, and it would be very complex to turn escaped identifiers into file-safe names.
12 lines
511 B
Swift
12 lines
511 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-alias "//my/project:uncommon_name=CommonName" -typecheck -I %S/Inputs/custom-modules %s -Rmodule-loading 2> %t/load-result.output
|
|
|
|
// RUN: %FileCheck %s -input-file %t/load-result.output -check-prefix CHECK-FOO
|
|
// CHECK-FOO: import `//my/project:uncommon_name`
|
|
// CHECK-FOO-NEXT: remark: loaded module 'CommonName'
|
|
|
|
import `//my/project:uncommon_name`
|
|
|
|
_ = MyStruct()
|
|
_ = `//my/project:uncommon_name`.MyStruct()
|