mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When compiling with allow errors, it's possible to have invalid inherited types - both null and ErrorType. Cleaned up the tests a little - moved the majority of Frontend/allow-errors.swift into separate files in Serialization/AllowErrors and use split_file.py instead of #defines. Resolves rdar://78048470
12 lines
748 B
Swift
12 lines
748 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// The module should be generated regardless of errors, including .swiftdeps, .d,
|
|
// .swiftsourceinfo, etc. Diagnostics should still be output as well
|
|
|
|
// RUN: %target-swift-frontend -verify -emit-module -o %t/errors.swiftmodule -emit-module-source-info -emit-module-doc -emit-reference-dependencies-path %t/errors.swiftdeps -emit-dependencies-path %t/errors.d -experimental-allow-module-with-compiler-errors -primary-file %s
|
|
// RUN: llvm-bcanalyzer %t/errors.swiftmodule | %FileCheck -check-prefix=CHECK-BC %s
|
|
// RUN: ls %t/errors.swiftdeps %t/errors.d %t/errors.swiftsourceinfo %t/errors.swiftdoc
|
|
// CHECK-BC-NOT: UnknownCode
|
|
|
|
public func invalid() -> undefined {} // expected-error {{cannot find type 'undefined'}}
|