Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing type checking of function return storage type #1028

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

MrDaiki
Copy link
Collaborator

@MrDaiki MrDaiki commented Jan 27, 2025

Issue

Compiler wasn't checking coherence of storage types between declared return storage type and return variable storage type. For more informations see #18

Solution

Defining a new function in pre-typing to check for this.

Implication

This change break retrocompatibility making some old program not valid. (some tests of the test suite had to be modified)

Fixes #18

@MrDaiki MrDaiki changed the title Correcting issue 18 Fixing type checking of function return storage type Jan 27, 2025
@MrDaiki MrDaiki force-pushed the issue_18 branch 4 times, most recently from bb278f9 to 45f39ae Compare February 4, 2025 10:06
@vbgl vbgl added this to the 2024.07.3 milestone Feb 4, 2025
@vbgl
Copy link
Member

vbgl commented Feb 4, 2025

This unveils issues in the libjade source code. Unfortunately, the source code of libjade that we use in CI is a frozen snapshot.

It is time to fix these libjade CI jobs.

It might be possible to go in two steps: first make this a warning and later turn it into an error.

@vbgl
Copy link
Member

vbgl commented Feb 4, 2025

Here is a fix for libjade: formosa-crypto/libjade#131

@vbgl vbgl force-pushed the issue_18 branch 2 times, most recently from a42781c to f335eaa Compare February 11, 2025 17:27
@vbgl vbgl requested a review from eponier February 12, 2025 06:18
@eponier eponier merged commit 73d0e83 into jasmin-lang:main Feb 12, 2025
@vbgl vbgl deleted the issue_18 branch February 12, 2025 10:34
@vbgl
Copy link
Member

vbgl commented Feb 12, 2025

Thanks for reviewing, polishing, and merging!

vbgl pushed a commit that referenced this pull request Feb 12, 2025
Adding checking to function storage signature against inferred type signature

(cherry picked from commit 73d0e83)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The storage modifier of the return type of a function is ignored
3 participants