Skip to content

Commit 6e61fc3

Browse files
committed
[cxx-interop] Fix tests that passed -module-name Swift
`Swift` is the name of the Swift standard library module. Creating another module with this name breaks assumptions in the compiler and caused these two tests to fail.
1 parent 2b4a7ff commit 6e61fc3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/Interop/Cxx/class/Inputs/module.modulemap

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ module AccessSpecifiers {
55

66
module TypeClassification {
77
header "type-classification.h"
8-
requires cplusplus
8+
// No 'requires cplusplus', because we don't want an implicit 'import Cxx'
9+
// when this module gets imported into Swift – the tests that use this module
10+
// override the 'Swift' module which causes a circular dependency between
11+
// 'Swift' and 'Cxx'.
912
}
1013

1114
module Constructors {
1215
header "constructors.h"
13-
requires cplusplus
16+
// No 'requires cplusplus', because we don't want an implicit 'import Cxx'
17+
// when this module gets imported into Swift – the tests that use this module
18+
// override the 'Swift' module which causes a circular dependency between
19+
// 'Swift' and 'Cxx'.
1420
}
1521

1622
module ConstructorsObjC {

0 commit comments

Comments
 (0)