Skip to content

Skolem let fix#374

Merged
rodrigogribeiro merged 6 commits into
mainfrom
skolem-let-fix
May 13, 2026
Merged

Skolem let fix#374
rodrigogribeiro merged 6 commits into
mainfrom
skolem-let-fix

Conversation

@rodrigogribeiro

Copy link
Copy Markdown
Collaborator

This PR fixes an issue in type checking Yul code and adds a test case suggested by @mbenke.

@rodrigogribeiro rodrigogribeiro requested a review from mbenke May 8, 2026 14:11
@mbenke

mbenke commented May 13, 2026

Copy link
Copy Markdown
Collaborator

I have some doubts about the error message:

$ esolc test/examples/cases/skolem-let.solc 
test/examples/cases/skolem-let.solc
Type not polymorphic enough! The annotated type is:
forall a . word -> a
but the infered type is:
word -> word
in:
forall a . function fromWord (x : word) -> a

 - in:forall a . function fromWord (x : word) -> a {
   let result ;
   assembly {
      result := x
   }
   return result;
}

...but x is in fact declared to have type a (which is misrepresented in the error message) and the problem is in result := x but I see it may be hard to report in a better way ("types $123 and word do not unify" probably would be even less helpful)

@mbenke mbenke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well done. Just minor complaints (feel free to ignore my rant about error message).

Comment thread test/Cases.hs Outdated
rodrigogribeiro and others added 2 commits May 13, 2026 10:20
Co-authored-by: Marcin Benke <marcin.benke@argot.org>
@rodrigogribeiro rodrigogribeiro merged commit f820c77 into main May 13, 2026
4 checks passed
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.

2 participants