Files
swift-mirror/test/FixCode/fixits-if-else.swift.result
Alex Hoppen 577727ad55 Remove DiagnosticsEditorMode
Migrate the last diagnostic to be independent of `DiagnosticEditorMode` and remove that option.

rdar://133111163
2024-08-14 11:24:31 -07:00

35 lines
576 B
Plaintext

// RUN: not %swift -emit-sil -target %target-triple %s -emit-fixits-path %t.remap -I %S/Inputs
// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result
func something() -> Bool { return true }
func foo1() {
if something() {
} else
}
func foo2() {
if something() {
} else
foo1()
}
func foo3() {
if something() {
} else if something() { // all on one line, 'if' inserted
}
}
func foo4() {
if something() {
} else something()
{
}
}
func foo5() {
if something() {
} else something()
foo1()
}