mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When analyzing a struct's layout to determine whether it contains a single non-empty field, bail upon encountering a field that is not ABI accessible. Previously, rather than bailing (though that was the intent), the field was ignored. The result was that struct's with a single non-empty field and any number of ABI inaccessible fields would be treated as if they only had a single non-empty field. Trouble ensued. rdar://79513293
16 lines
168 B
Swift
16 lines
168 B
Swift
enum E<Value> {
|
|
case s(Value)
|
|
case n
|
|
}
|
|
|
|
public struct S<Value> {
|
|
var e: E<Value>
|
|
var b: Bool = false
|
|
|
|
public init() {
|
|
self.e = .n
|
|
}
|
|
}
|
|
|
|
|