[SR-11559] Iterating over ClosedRange<Character> crashes the compiler #53964
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
type checker
Area → compiler: Semantic analysis
Environment
I'm using the Swift that's part of Xcode 11.1 GM seed (11A1027) on macOS 10.15 Developer Beta 10.
I haven't tested this on the current master branch.
Additional Detail from JIRA
md5: 9ed2a900fe6fda0b29edeb0e0e2f4d73
Issue Description:
This (invalid) code crashes the compiler:
I would have expected a compiler error because
charRange
is not aSequence
so the for loop should not compile. Interestingly, that's exactly what I get when I remove thecharRange
variable and create the range directly in the for loop. This behaves correctly:The text was updated successfully, but these errors were encountered: