mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Always give stored property initializers the linkage of the type that contains them, even if the property is less visible than the type. This fixes the case where a type defines a private property, and an extension in a different file from the same module defines a constructor. Fixes <rdar://problem/32743703>.
13 lines
168 B
Swift
13 lines
168 B
Swift
struct HasInitValue {
|
|
var x = 10
|
|
var y: String = ""
|
|
}
|
|
|
|
struct HasPrivateInitValue {
|
|
private var x = 10
|
|
}
|
|
|
|
public struct PublicStructHasInitValue {
|
|
var x = 10
|
|
}
|