mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If code is irreparably broken when migrating, make sure to check that the pre-fix-it compiler instance is `nullptr` and bail if so. rdar://problem/32240138
12 lines
640 B
Swift
12 lines
640 B
Swift
// For files that can never compile, make sure we don't crash when
|
|
// attempting to do some pre-fixit runs early in the Migrator pipeline.
|
|
// Since this code isn't fixable, the invocation should exit with non-zero status.
|
|
|
|
// RUN: not %target-swift-frontend -typecheck -update-code -primary-file %s %S/Inputs/never_compiles_safely_exits_breaking_code.swift -emit-remap-file-path %t/never_compiles_safely_exits.remap -emit-migrated-file-path %t/never_compiles_safely_exits.result -swift-version 4
|
|
// RUN: not ls %t/never_compiles_safely_exits.swift.result
|
|
// RUN: not ls %t/never_compiles_safely_exits.swift.remap
|
|
|
|
func bar() {
|
|
foo(bar)
|
|
}
|