Files
swift-mirror/test/Constraints/keypath_swift_5.swift
2018-06-19 12:57:05 -07:00

14 lines
398 B
Swift

// RUN: %target-swift-frontend -typecheck -verify %S/Inputs/keypath.swift -primary-file %s -swift-version 5
struct S {
let i: Int
init() {
let _: WritableKeyPath<S, Int> = \.i // expected-error {{type of expression is ambiguous without more context}}
}
}
func test() {
let _: WritableKeyPath<C, Int> = \.i // expected-error {{type of expression is ambiguous without more context}}
}