mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Consider a module with two files, one of which references a function in the other file. If the function had PublicNonABI linkage, the forward reference has HiddenExternal linkage. If we saw the forward reference first in the merge modules process, we would not update the linkage of the function when we later deserialized its body. This would result in it being dropped from the final merged SIL module. Previously this did not cause any problems because all inlineable functions had public linkage, but now that default argument generators no longer have public entry points, this could cause linker errors.
2 lines
46 B
Swift
2 lines
46 B
Swift
public func hasDefaultArgument(x: Int = 0) {}
|