mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
At Onone, many types of functions (anything user written, compiler generated setters and getters, etc), should be kept in the final binary so they're accessible by the debugger. rdar://126763340
23 lines
406 B
Swift
23 lines
406 B
Swift
// RUN: %target-swift-frontend -emit-ir %s -enable-experimental-feature Embedded | %FileCheck %s
|
|
|
|
// REQUIRES: swift_in_compiler
|
|
// REQUIRES: VENDOR=apple
|
|
// REQUIRES: OS=macosx
|
|
|
|
struct Foo {
|
|
public subscript(x: Int) -> Int {
|
|
get {
|
|
return 0
|
|
}
|
|
|
|
@available(*, unavailable)
|
|
set { }
|
|
}
|
|
}
|
|
|
|
let foo = Foo()
|
|
let _ = foo[5]
|
|
|
|
// CHECK: $s4main3FooVyS2icig
|
|
// CHECK-NOT: $s4main3FooVyS2icis
|