julia
f5498940 - compiler: Fix TypeVar/Vararg assertion in type limiting

Commit
84 days ago
compiler: Fix TypeVar/Vararg assertion in type limiting The `__limit_type_size` function in typelimits.jl would incorrectly pass non-Type arguments (specifically nested Vararges) to `_limit_type_size`, triggering an assertion failure. This occurred when unwrapping a Vararg type with `unwrapva` resulted in another Vararg or TypeVar, which was not handled before falling through to `_limit_type_size`. The fix adds a check after unwrapping the comparison type `c` to detect if the result is still a Vararg or TypeVar, and recursively handles these cases by calling `__limit_type_size` again. This ensures that by the time we reach `_limit_type_size`, both arguments are proper Type objects as expected by the assertion. Fixes #59918
Author
Parents
Loading