mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The error shown when the compiler fails to build a module from its textual interface has been creating some confusion. This is a proposal to make it more useful to the programmer not working in the SDK, insist on looking at the previous errors first, put less emphasis on possible compiler bugs, and always show alternatives to the incompatible compilers issue as this is the most common case now.
7 lines
481 B
Swift
7 lines
481 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: not %target-swift-frontend -I %S/Inputs/failing-overlay/ -typecheck %s 2>&1 | %FileCheck %s
|
|
|
|
import ImportsOverlay
|
|
|
|
// CHECK: HasOverlay.swiftinterface:1:1: error: failed to build module 'HasOverlay' for importation due to the errors above; the textual interface may be broken by project issues, differences between compilers (the producer '(unspecified, file possibly handwritten)' and this compiler '{{.*Swift version.*}}') or a compiler bug
|