Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0113-rdar33044867.swift
Pavel Yaskevich 481401f6c3 [QoI] Don't try to lookup members on incorrect type during Objective-C KeyPath validation
While trying to validate Objective-C keypath components
don't assume that type of the component is always correct, check
before trying to see if it's bridged type or has members.

Resolves: rdar://problem/33044867
2017-07-12 14:04:10 -07:00

16 lines
271 B
Swift

// RUN: not %target-swift-frontend %s -typecheck
public class A {
var property: UndeclaredType
var keyPath: Any {
return #keyPath(property.foo)
}
}
public class B {
var property: UndeclaredType
var keyPath: Any {
return [#keyPath(property.foo)]
}
}