Files
swift-mirror/test/multifile/default-arguments/two-modules/Inputs/library2.swift
Slava Pestov 7dc7a1fc4c Serialization: When deserializing a SIL function in the merge-modules step, update linkage
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.
2018-01-21 01:31:44 -08:00

2 lines
46 B
Swift

public func hasDefaultArgument(x: Int = 0) {}