If a uint expression is passed as the max_length parameter to as-max-length? which is not a uint literal, we get the following error that is confusing to developers:
error: expecting expression of type 'uint', found 'uint'
Describe the solution you'd like
low's suggestion from a Discord discussion sounds good to me:
error: expecting 'uint' literal, found expression of type 'uint'
That, together with correctly identifying that specific parameter, and not the whole as-max-length? expression, would make this a very clear error.
If a
uint
expression is passed as themax_length
parameter toas-max-length?
which is not a uint literal, we get the following error that is confusing to developers:Describe the solution you'd like
low's suggestion from a Discord discussion sounds good to me:
That, together with correctly identifying that specific parameter, and not the whole
as-max-length?
expression, would make this a very clear error.Additional context
Simple reproducer: