Files
swift-mirror/test/refactoring/RefactoringKind/crashers.swift
Rintaro Ishizaki b984789ee5 [AST] Initialize Target of break/continue with nullptr
Otherwise, it's never initialized. This doesn't affect normal compilation
because it doensn't reach only-user SILGen due to typecheck error. However,
IDE refactoring uses this regardless of the error.

rdar://problem/33972653
2018-04-20 15:25:09 +09:00

23 lines
523 B
Swift

// rdar://36755861
func doit(_: ()->()) {}
struct S {}
func foo() {
doit {
let s = S()
}
var a: Int
}
// RUN: %refactor -source-filename %s -pos=6:5 -end-pos=6:13 | %FileCheck %s -check-prefix=CHECK1
// RUN: %refactor -source-filename %s -pos=8:1 -end-pos=8:13 | %FileCheck %s -check-prefix=CHECK1
// CHECK1: Action begins
// rdar://33972653
func test() {
break FOO
continue FOO
}
// RUN: %refactor -source-filename %s -pos=17:3 -end-pos=18:15 | %FileCheck %s -check-prefix=CHECK2
// CHECK2: Action begins