Skip to content

[no merge] Add a (failing) test case to show the problem. #40483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef TEST_INTEROP_CXX_MODULES_INPUTS_CASMSN_H
#define TEST_INTEROP_CXX_MODULES_INPUTS_CASMSN_H

struct X { };

#endif // TEST_INTEROP_CXX_MODULES_INPUTS_CASMSN_H
5 changes: 5 additions & 0 deletions test/Interop/Cxx/modules/Inputs/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ module Namespace {
header "namespace.h"
requires cplusplus
}

module SameName {
header "clang-and-swift-module-same-name.h"
requires cplusplus
}
1 change: 1 addition & 0 deletions test/Interop/Cxx/modules/Inputs/same-name-lib.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public protocol X { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// RUN: %empty-directory(%t)
// RUN: cd %t
// RUN: %target-build-swift %S/Inputs/same-name-lib.swift -emit-module -emit-library -module-name SameNameLib
// RUN: %target-build-swift %s -I %S/Inputs -Xfrontend -enable-cxx-interop -o %t/run -I %t/ -L %t/ -lSameNameLib

import SameName
import SameNameLib

public func test(x: X) { }