Files
swift-mirror/validation-test/IRGen/Inputs/rdar79513293_Library.swift
Nate Chandler da5888fd3f [IRGen] Bail on opt when seeing non-ABI field.
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
2022-03-30 17:55:39 -07:00

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
}
}