generic pack iteration compiler crash when accessing property #78385
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
triage needed
This issue needs more specific labels
Description
Not sure how to describe this exactly, but basically if you try to access, in a pack iteration, a property of a generic type, which is itself a property of a generic type, the compiler crashes.
The program below is a simplified version of a program where I encountered this issue; i'm not sure if there's just one bug here or multiple, since there seem to be multilpe constellations of changes one can apply to the program to get it to work/crash.
For example, in the program below, any of the following changes will make it compile
SampleType
non-genericT
toSampleType
title: String
or therange: ClosedRange<Double>?
propertyrange
property non-optionalrange
to e.g.Int
Reproduction
Stack dump
Expected behavior
the code, as above, should compile fine when using pack iteration
Environment
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx14.0
Additional information
The slightly-less-simplified version where I encountered this bug, which does in fact use the `T` generic parameter in the `SampleType` struct:
The text was updated successfully, but these errors were encountered: