Files
swift-mirror/test/DebugInfo/subscript.swift
Adrian Prantl 229ad8ba84 Replace hardcoded special names with call into getUserfacingName()
This fixes an assertion failure when encountering previously unhandled special names.

rdar://110841130
2023-06-15 13:24:59 -07:00

15 lines
411 B
Swift

// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - -parse-as-library -module-name a | %FileCheck %s
public protocol P {}
public class C : P {}
public struct S {}
public extension S {
subscript<T>(_ val: T, _ type : T.Type = T.self) -> T? { return nil }
}
public func f() {
S()[0]
}
// CHECK: !DISubprogram(name: "deinit"
// CHECK: !DISubprogram(name: "init"
// CHECK: !DISubprogram(name: "subscript