mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If the replaced symbol goes away in the original library, the replacement key in the replacement descriptor will be null. Handle this by ignoring the replacement entry rather than crashing. rdar://103307821
26 lines
408 B
Swift
26 lines
408 B
Swift
public struct A {
|
|
public var x : Int = 0
|
|
public var y : Int = 1
|
|
public init() {}
|
|
#if BEFORE
|
|
public func print() {
|
|
printThis()
|
|
}
|
|
|
|
public dynamic func printThis() {
|
|
Swift.print(x)
|
|
Swift.print(y)
|
|
}
|
|
#else
|
|
public func print() {
|
|
printThis2()
|
|
}
|
|
|
|
public dynamic func printThis2() {
|
|
Swift.print(x)
|
|
Swift.print(y)
|
|
}
|
|
|
|
#endif
|
|
}
|