Files
swift-mirror/test/ClangImporter/module-alias.swift
Tony Allevato 2b0f9aa765 Allow module aliases to use escaped identifiers as the alias name.
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.
2025-03-11 17:18:43 -04:00

12 lines
447 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -module-alias UncommonName=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 UncommonName
// CHECK-FOO-NEXT: remark: loaded module 'CommonName'
import UncommonName
_ = MyStruct()
_ = UncommonName.MyStruct()