mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Migrate the last diagnostic to be independent of `DiagnosticEditorMode` and remove that option. rdar://133111163
35 lines
576 B
Plaintext
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()
|
|
}
|