Skip to content

Failed to produce diagnostic for expression when looping over sequence with mixed types and range #63375

Open
@vojtarylko

Description

@vojtarylko

Description
I get unexpected error: failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project when compiling following code.

Steps to reproduce
Compile following code:

for i in [Int64.min, Int32.min] + (0...10) { continue }

Expected behavior
The code should compile or proper error should be printed. Note this compiles just fine:

for i in [Int64.min, Int32.min] { continue }
for i in [Int64.min] + (0...10) { continue }

Environment
swift-driver version: 1.62.15 Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)
Target: x86_64-apple-macosx13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselffailed to produce diagnosticBug → internal error: Failed to produce diagnostic for expressionfor-in loopsFeature: for-in loopsswift 5.9type checkerArea → compiler: Semantic analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions