Files
swift-mirror/test/Parse/implicit_getter_incomplete.swift
Rintaro Ishizaki ad4b9df3c0 [CodeCompletion] Suggest the property name in its didSet clause
Previously, property names are hidden in the whole range of the
declarations. Now, it's only hidden in its own initializer range.

rdar://problem/49697202
2019-12-03 18:12:47 -08:00

19 lines
578 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}} expected-note {{'a' declared here}}
switch i { // expected-error {{use of unresolved identifier 'i'; did you mean 'a'}} expected-error{{'switch' statement body must have at least one 'case'}}
}
// expected-error@+1 2 {{expected '}'}}