mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
206 B
Swift
13 lines
206 B
Swift
// RUN: %target-swift-frontend -emit-ir %s
|
|
|
|
public struct X {
|
|
public subscript(_ key: String, as type: Error.Type = Error.self) -> Error? {
|
|
get {
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
|
|
let x = X()
|
|
_ = x["hi"]
|