Using ArraySlice<Substring>
in a Set
causes a flaky crash
#59865
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Describe the bug
Using
ArraySlice<Substring>
in aSet
or as aDictionary
key crashes sometimes withFatal error: Duplicate elements of type 'ArraySlice<Substring>'
. The crash is not stable but wrapping it in a loop makes it easy to reproduce.In the provided reproduction example changing any of the following fixes the crash:
ArraySlice<Substring>
toArraySlice<String>
import A.C
toimport D.C
To Reproduce
main.swift
file:swiftc main.swift
orswiftc -O main.swift
../main
Expected behavior
The process doesn't crash
Screenshots
![Screenshot 2022-07-02 at 18 52 09](https://user-images.githubusercontent.com/8717108/176997629-d9b46a50-4a5e-4925-b840-da6e7d0980a6.png)
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: