Skip to content

ast: set inferred argument field types before checking argument types in call#5564

Draft
fridis wants to merge 1 commit intomainfrom
fix_5560
Draft

ast: set inferred argument field types before checking argument types in call#5564
fridis wants to merge 1 commit intomainfrom
fix_5560

Conversation

@fridis
Copy link
Copy Markdown
Member

@fridis fridis commented Jul 18, 2025

This ensures that failure to infer the argument type due to incompatible actual arguments as in the exampe from #5560

f(v) => say v
f "a"
f 1

will be reported first and the type of the argument will be set to t_ERROR such that no subsequent error will be shown for the actual arguments passed to the call.

This required explicitly checking the called feature's types first and making Feature.checkTypes() re-entrant.

The stricter checking required a minor change in a loop in Sieve_Cache that can no longer use auto-unwrap.

fix #5560.

… in call

This ensures that failure to infer the argument type due to incompatible actual
arguments as in the exampe from #5560

    f(v) => say v
    f "a"
    f 1

will be reported first and the type of the argument will be set to t_ERROR such
that no subsequent error will be shown for the actual arguments passed to the
call.

This required explicitly checking the called feature's types first and making
Feature.checkTypes() re-entrant.

The stricter checking required a minor change in a loop in `Sieve_Cache` that
can no longer use auto-unwrap.

fix #5560.
@fridis fridis marked this pull request as draft July 18, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure to infer arguments types from call site results in too many errors

1 participant