ModuleInterface: Test printing of qualified types from submodules.

This commit is contained in:
Allan Shortlidge
2024-01-04 10:38:02 -08:00
parent 2752414d78
commit 3087454b05
4 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1 @@
struct HasSubmoduleType {};

View File

@@ -0,0 +1 @@
struct SubmoduleType {};

View File

@@ -0,0 +1,8 @@
module HasSubmodule {
header "HasSubmodule.h"
export *
explicit module Submodule {
header "Submodule.h"
export *
}
}

View File

@@ -0,0 +1,11 @@
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name ImportsSubmodule -I %S/Inputs/submodule-type
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name ImportsSubmodule -I %S/Inputs/submodule-type
// RUN: %FileCheck %s < %t.swiftinterface
import HasSubmodule.Submodule
// CHECK: public func takesHasSubmoduleType(_ x: HasSubmodule.HasSubmoduleType)
public func takesHasSubmoduleType(_ x: HasSubmoduleType) {}
// CHECK: public func takesSubmoduleType(_ x: HasSubmodule.SubmoduleType)
public func takesSubmoduleType(_ x: SubmoduleType) {}