File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change
1
+ class Foo { }
Original file line number Diff line number Diff line change
1
+ class Bar { }
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+
3
+ // A module should fail to be generated if the same filename is used twice and '-experimental-allow-module-with-compiler-errors' is not passed
4
+
5
+ // RUN: not %target-swift-frontend -emit-module -o %t/no_allow_compiler_errors.swiftmodule %S/Inputs/same_filename/A/File.swift %S/Inputs/same_filename/B/File.swift
6
+ // RUN: not ls %t/no_allow_compiler_errors.swiftmodule
7
+
8
+ // If '-experimental-allow-module-with-compiler-errors' is passed, we should throw an error but still generate a module
9
+
10
+ // RUN: %target-swift-frontend -emit-module -experimental-allow-module-with-compiler-errors -o %t/allow_compiler_errors.swiftmodule %S/Inputs/same_filename/A/File.swift %S/Inputs/same_filename/B/File.swift 2>&1 | %FileCheck %s
11
+ // RUN: ls %t/allow_compiler_errors.swiftmodule
12
+
13
+ // CHECK: filename "File.swift" used twice:
You can’t perform that action at this time.
0 commit comments