Files
swift-mirror/test/expr/unary/keypath/keypath-unimplemented.swift
Joe Groff 2ba8f57514 Remove staging flag for unimplemented key path components.
All the originally-planned component kinds are now implemented.
2017-09-15 11:55:35 -07:00

15 lines
453 B
Swift

// RUN: %target-swift-frontend -typecheck -verify %s
struct A {
subscript(x: Int) -> Int { return x }
var c: C? = C()
}
class C {
var i = 0
}
// rdar://problem/32209039 - Improve diagnostic when unsupported tuple element references are used in key path literals
let _ = \(Int, String).0 // expected-error {{key path cannot reference tuple elements}}
let _ = \(a: Int, b: String).b // expected-error {{key path cannot reference tuple elements}}