Files
swift-mirror/test/Interpreter/Inputs/dynamic_replacement_libA.swift
Arnold Schwaighofer 1e82ef8df7 Fix dynamic replacement of weakly linked symbols
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
2022-12-15 13:19:34 -08:00

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
}