failed to produce diagnostic for ... a range expression #72533
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
expressions
Feature: expressions
for-in loops
Feature: for-in loops
generics
Feature: generic declarations and types
internal error
Bug: Internal error
operators
Feature: operators
statements
Feature: statements
swift 6.0
type checker
Area → compiler: Semantic analysis
Description
when the left-hand side of the range operator was changed from 0 to
Int(minB)
.Reproduction
Stack dump
Expected behavior
The rhs to the range operator is of type Int16. If that is changed to
Int(ValueType.max)
, to match the type of the lhs, problem goes away.Is "failed to produce diagnostic" the best diagnostic the compiler can produce to explain what is wrong with the source code?
Environment
% swift -version
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Additional information
No response
The text was updated successfully, but these errors were encountered: