Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make int literals with range type match their base type better than o…
…ther int types (#24017) This is a very niche case encountered in #24012, where an int literal got a `range` type as a result of a generic instantiation (in `tgenericcomputedrange`), I can't think of another test case. The base type of the range being `int` made it match `int` with `isSubrange` as in the first `if` branch, but other int types like `int32` matched with `isFromIntLit` which is a better match. Instead, int literals with range type now: 1. match their base type with `isFromIntLit`, 2. don't match other int types with `isFromIntLit`, instead giving `isConvertible` as in the last `if` branch in `handleRange`.
- Loading branch information