#​0 0x00007fff66928d1e in _dispatch_gate_wait_slow ()
#​1 0x0000000109b1d0f9 in swift_once ()
#​2 0x00000001025e5d0f in type metadata accessor for Property ()
#​3 0x00000001025e60f1 in type metadata accessor for PropertyValue<Property> ()
#​4 0x00000001025ea536 in ___lldb_unnamed_symbol1$$GenericEnumBug ()
#​5 0x00007fff66918db8 in _dispatch_client_callout ()
#​6 0x00007fff66918d6b in dispatch_once_f ()
#​7 0x0000000109b1d0f9 in swift_once ()
#​8 0x00000001025e5d0f in type metadata accessor for Property ()
#​9 0x00000001025da701 in type metadata accessor for PropertyValue<Property> ()
#​10 0x00000001025da66a in PropertyValueTests.testEquality() ()
#​11 0x00000001025da964 in @objc PropertyValueTests.testEquality() ()
This is in the latest Xcode 10 b4 and also with the latest Swift 4.2 toolchain from 22.July.
The runtime crash goes away as soon as I remove the `date: Date?` parameter from the one case of the enum.
That was seriously annoying to track down and I remember having already had one problem with a Date property once. So I wonder: What the heck is up with `Date`s and the Swift runtime? 🙂
Mhm, and it seems on my larger un-reduced project I also have a problem when I don't use Date or DateComponents. Oh boy…
I'll try to figure out more in the small test-project, but the error is always the same it seems.
That is definitely the same bug where in-place metadata initialization doesn't use the general metadata-construction infrastructure that supports recursive dependencies.
There should be an easy workaround, which is to make the case involving resilient library types (`Date`, `Data`, etc.) `indirect`.
Attachment: Download
Additional Detail from JIRA
md5: 3922fd6b016c1a251c7cb810b0c9a92a
duplicates:
Issue Description:
Attached is an example project. The code does work within a playground so I suppose it has to do with module boundaries.
Given:
When I just create an instance in the unit test bundle (Just press Command + U in the sample)
I get a runtime crash with the stack showing
This is in the latest Xcode 10 b4 and also with the latest Swift 4.2 toolchain from 22.July.
The runtime crash goes away as soon as I remove the `date: Date?` parameter from the one case of the enum.
That was seriously annoying to track down and I remember having already had one problem with a Date property once. So I wonder: What the heck is up with `Date`s and the Swift runtime?🙂
See SR-7221
/cc @belkadan @slavapestov
I really want this in Swift 4.2!❤️
The text was updated successfully, but these errors were encountered: