Files
swift-mirror/test/Migrator/never_compiles_safely_exits.swift
David Farler d4c9eb1db7 [Migrator] Add null check when pre-fix-it passes fail
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
2017-05-18 14:26:10 -07:00

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