mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
`#fileID` never accounted for the possibility that someone one have a module alias _itself_, so it always generated the module's real (physical) name. This _technically_ changes the behavior of `#fileID` for self-aliased modules, but since nobody would have ever had a reason to do that before raw identifiers, it's unlikely that this change would affect anyone in practice.
10 lines
572 B
Swift
10 lines
572 B
Swift
// Tests that `#fileID` has the correct module name when a module aliases
|
|
// itself (to internally refer to itself a raw identifier name instead of the
|
|
// -module-name, which must be filesystem-friendly).
|
|
|
|
// RUN: %target-swift-frontend -module-name Original -module-alias "^raw*identifier^=Original" %s -emit-silgen | %FileCheck %s
|
|
|
|
print("#fileID = \(#fileID)")
|
|
// CHECK: %{{[0-9]+}} = string_literal utf8 "`^raw*identifier^`/fileid-raw-identifier-module-name.swift"
|
|
// CHECK-NOT: %{{[0-9]+}} = string_literal utf8 "Original/fileid-raw-identifier-module-name.swift"
|