mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SILGen does this now to maintain ownership balance when a class initializer delegation gets interrupted, such as by an error propagation through one of the arguments to the delegatee. Fixes rdar://problem/37007554 .
13 lines
201 B
Swift
13 lines
201 B
Swift
// RUN: %target-swift-frontend -emit-sil -verify %s
|
|
|
|
class Y: X {
|
|
required init(_: Z) throws {
|
|
try super.init(Z())
|
|
}
|
|
}
|
|
class Z { init() throws {} }
|
|
|
|
class X {
|
|
required init(_: Z) throws {}
|
|
}
|