Files
swift-mirror/test/SourceKit/CursorInfo/rdar_30292429.swift
Nathan Hawes 53e1bdc1e3 [cursor-info] Fix crash due to invalid base type in the PrintOptions passed to the AST printer
Resolves rdar://problem/30248264
Also added test cases for rdar://problem/30292429 (already fixed)
2017-04-06 16:04:07 -07:00

17 lines
458 B
Swift

// Checks that we don't crash.
// RUN: %sourcekitd-test -req=cursor -pos=10:17 %s -- %s | %FileCheck -check-prefix=CHECK %s
// RUN: %sourcekitd-test -req=cursor -pos=13:22 %s -- %s | %FileCheck -check-prefix=CHECK2 %s
class A {
var field: Bool = true
var items: [Int] = []
func method() {
if /*here:*/field {}
// CHECK: source.lang.swift.ref.var.instance
for _ in /*here*/items {}
// CHECK2: source.lang.swift.ref.var.instance
}
}