Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0112-rdar33135487.swift
Pavel Yaskevich c45073efd1 [QoI] Don't try to lookup members on incorrect type while diagnosing keypath components
While trying to diagnose problems related to 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/33135487
2017-07-05 17:19:05 -07:00

9 lines
231 B
Swift

// RUN: not %target-swift-frontend %s -typecheck
enum State<StateType> {
func put<StateType>() -> StateType {}
func put<T>(keyPath: WritableKeyPath<StateType, T>, projection: T) {
put(keyPath: \.age, projection: {})
}
}