Skip to content

Conversation

Kamirus
Copy link
Member

@Kamirus Kamirus commented Oct 8, 2025

No description provided.

@Kamirus Kamirus changed the base branch from master to claudio/inf-errors October 8, 2025 14:07
ts, t_arg', t_ret'
| _::_, None -> (* implicit, infer *)
infer_call_instantiation env t1 ctx_dot tbs t_arg t_ret exp2 at t_expect_opt extra_subtype_problems
match dot_full_inst with
Copy link
Contributor

@crusso crusso Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually complete? The full instantiation might be too specific to match the other args?
I.e. if you had inferred with the arguments in hand, you might have chosen a different, weaker, instantiation to accommodate them as well as the receiver.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's "safe" in that it'll never infer anything non-principal, right? It might reject more programs than we accepted before. Maybe we could weaken this to a "second pass" in the error case in the future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, fixing parts of the instantiation early based on the receiver can be more restrictive.
If we want the same inference results for both dot and without dot syntax then we should not use the partial instantiation.
I'd like to explore an alternative of reporting better bimatch errors

@crusso crusso marked this pull request as ready for review October 8, 2025 14:57
@crusso crusso requested a review from a team as a code owner October 8, 2025 14:57
@crusso crusso marked this pull request as draft October 8, 2025 14:57
Base automatically changed from claudio/inf-errors to master October 8, 2025 14:57
Copy link
Contributor

github-actions bot commented Oct 8, 2025

Comparing from eea6ebc to be30721:
The produced WebAssembly code seems to be completely unchanged.
In terms of gas, no changes are observed in 5 tests.
In terms of size, no changes are observed in 5 tests.

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.

3 participants