// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s // rdar://problem/46632723 public struct Foo: Hashable { } public struct Bar { public subscript (foo: W) -> Int { return 0 } // CHECK-LABEL: define {{.*}} @"$s17keypath_subscript3FooVyqd__Gr0__lTh" // CHECK: call swiftcc %swift.metadata_response @"$s17keypath_subscript3FooVMa" public func blah(_: W) -> AnyKeyPath { return \Bar.[Foo()] as AnyKeyPath } }