Files
swift-mirror/test/Parse/implicit_getter_incomplete.swift
Xi Ge b4cf37bf7d Sema: several improvements on missing switch cases diagnostics. (#8026)
1. Make sure the actions taken by fixits are reflected in diagnostics messages.
2. Issue missing cases diagnostics at the start of the switch statement instead of its end.
3. Use <#code#> instead of <#Code#> in the stub.
2017-03-10 19:32:37 -08:00

19 lines
513 B
Swift

// RUN: %target-typecheck-verify-swift
func test1() {
var a : Int {
#if arch(x86_64)
return 0
#else
return 1
#endif
}
}
// Would trigger assertion when AST verifier checks source ranges ("child source range not contained within its parent")
func test2() { // expected-note {{match}}
var a : Int { // expected-note {{match}}
switch i { // expected-error {{unresolved identifier}} expected-error{{'switch' statement body must have at least one 'case'}}
}
// expected-error@+1 2 {{expected '}'}}