mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15f8eb45ea (see PR#26632) introduced
refined didSet semantics where the `oldValue` parameter is skipped if it
isn't used. This would perform typechecking, but later try to set the
body to skipped and thus fire an assert.
For now, do not attempt to skip typechecking of didSet accessors. Still
skip outputting their SIL though.
10 lines
192 B
Swift
10 lines
192 B
Swift
// RUN: %target-swift-frontend -emit-module %s -experimental-skip-non-inlinable-function-bodies
|
|
|
|
struct Foo {
|
|
var fieldWithDidSet : Int {
|
|
didSet {
|
|
let local = oldValue
|
|
}
|
|
}
|
|
}
|