mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILGen: Fix linkage for stored property initializers of private properties
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>.
This commit is contained in:
@@ -2,3 +2,11 @@ struct HasInitValue {
|
||||
var x = 10
|
||||
var y: String = ""
|
||||
}
|
||||
|
||||
struct HasPrivateInitValue {
|
||||
private var x = 10
|
||||
}
|
||||
|
||||
public struct PublicStructHasInitValue {
|
||||
var x = 10
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user