Files
swift-mirror/test/Frontend/allow-errors.swift
Ben Barham c1e4362dfd [Serialization] Do not assert when inherited type is null
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
2021-05-15 16:35:23 +10:00

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'}}