Files
swift-mirror/test/ParseableInterface/exported-module-name.swift
Jordan Rose 0366343681 [ParseableInterface] Honor "exported module names"
(as described in the previous commit)

When printing an interface that has to be stable, we need to use the
module name that identifies where declarations should be searched for,
just like we do with serialization.

rdar://problem/49114811
2019-03-21 15:22:17 -07:00

20 lines
942 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/CoreKitClient.swiftinterface -module-name CoreKitClient -I %S/Inputs/exported-module-name-before %s
// RUN: %FileCheck -implicit-check-not BAD %s < %t/CoreKitClient.swiftinterface
// Test that we can rebuild it even when the "export as" module goes away.
// RUN: %target-swift-frontend -build-module-from-parseable-interface -o %t/CoreKitClient.swiftmodule -I %S/Inputs/exported-module-name-after %t/CoreKitClient.swiftinterface
// CHECK: import CoreKit
import CoreKit
// CHECK-LABEL: public struct CKThingWrapper : RawRepresentable {
public struct CKThingWrapper: RawRepresentable {
public var rawValue: CKThing
public init(rawValue: CKThing) {
self.rawValue = rawValue
}
// Note that this is CoreKit.CKThing, not ExportAsCoreKit.CKThing
// CHECK: public typealias RawValue = CoreKit.CKThing
} // CHECK: {{^}$}}