blob: 3830d014269317dd1e27d7961dad92d6a286c95d [file] [log] [blame]
// RUN: %target-swift-frontend %s -emit-silgen | %FileCheck %s
// Make sure that we can parse escaped subscripts (representing functions named "subscript") in vtables
sil_stage raw
import Builtin
import Swift
import SwiftShims
class SubscriptAsFunction {
func `subscript`()
}
sil hidden @_T04test19SubscriptAsFunctionC9subscriptyyF : $@convention(method) (@guaranteed SubscriptAsFunction) -> () {
bb0(%0 : $SubscriptAsFunction):
return undef : $()
}
sil_vtable SubscriptAsFunction {
// CHECK: #SubscriptAsFunction.`subscript`!1: (SubscriptAsFunction) -> () -> () : _T04test19SubscriptAsFunctionC9subscriptyyF
#SubscriptAsFunction.`subscript`!1: (SubscriptAsFunction) -> () -> () : _T04test19SubscriptAsFunctionC9subscriptyyF
}