mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Ideally, module interface verification should fail the build when fatal error occurs when type checking emitted module interfaces. However, we found it's hard to stage this phase in because the ideal case requires all Swift adopters to have valid interfaces. This new front-end flag allows driver to downgrade all interface verification errors to warnings as an intermediate step.
10 lines
494 B
Swift
10 lines
494 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: echo "// swift-interface-format-version: 1.0" > %t/Main.swiftinterface
|
|
// RUN: echo "// swift-module-flags: -module-name Foo" >> %t/Main.swiftinterface
|
|
// RUN: echo "malfunctioned" >> %t/Main.swiftinterface
|
|
// RUN: %target-swift-frontend -typecheck-module-from-interface %t/Main.swiftinterface -module-name Foo -downgrade-typecheck-interface-error &> %t/results.txt
|
|
// RUN: %FileCheck --input-file %t/results.txt %s
|
|
|
|
// CHECK: warning:
|
|
// CHECK-NOT: error:
|