mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Specifically, when the class is referenced from Objective-C first,
before being referenced from Swift in any way. This is important for
resilience, since up until now Objective-C isn't used to the size of a
class changing based on anything other than a superclass's size
changing.
This is basically the test that would have gone with 9024768b0 had
there been a build of libobjc to test it with.
rdar://problem/45718008
12 lines
185 B
Swift
12 lines
185 B
Swift
public struct GrowsToInt64 {
|
|
#if SMALL
|
|
var value: Int32
|
|
#elseif BIG
|
|
var value: Int64
|
|
#else
|
|
#error("Must define SMALL or BIG")
|
|
#endif
|
|
|
|
public init() { self.value = 0 }
|
|
}
|