Files
swift-mirror/test/Interpreter/Inputs/dynamic_replacement_ReplacementA.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

9 lines
154 B
Swift

@_weakLinked import LibA
extension A {
@_dynamicReplacement(for: printThis())
func _replacementForPrintThis() {
Swift.print("replacement")
}
}