mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This means all cross-module references and all mangled names will consistently use the Swift 4 name (the canonical type), no special handling required. The main thing we lose here is that the Swift 4 names of imported types become usable in Swift 3 mode without any diagnostics, similar to how most language features introduced in Swift 4 are available in Swift 3 mode. It also implies that the Swift 4 name will show up in demangled names. rdar://problem/31616162
16 lines
1.1 KiB
Swift
16 lines
1.1 KiB
Swift
// RUN: rm -rf %t && mkdir -p %t
|
|
|
|
// Use fake mangled names here with the name of the imported module.
|
|
// swift-ide-test isn't testing the full demangling algorithm.
|
|
|
|
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 3 -find-mangled _T0So16ImportantCStructa | %FileCheck -check-prefix=CHECK-TOP-ALIAS %s
|
|
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 4 -find-mangled _T0So16ImportantCStructa | %FileCheck -check-prefix=CHECK-TOP-ALIAS %s
|
|
|
|
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 3 -find-mangled _T0So13InnerInSwift4a | %FileCheck -check-prefix=CHECK-NESTED-ALIAS %s
|
|
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 4 -find-mangled _T0So13InnerInSwift4a | %FileCheck -check-prefix=CHECK-NESTED-ALIAS %s
|
|
|
|
import APINotesFrameworkTest
|
|
|
|
// CHECK-TOP-ALIAS: typealias ImportantCStruct = VeryImportantCStruct
|
|
// CHECK-NESTED-ALIAS: typealias InnerInSwift4 = Outer.Inner
|