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

Use multiple crates #145

Merged
merged 2 commits into from
Oct 7, 2024
Merged

Use multiple crates #145

merged 2 commits into from
Oct 7, 2024

Conversation

virgil-serbanuta
Copy link
Member

No description provided.

@virgil-serbanuta virgil-serbanuta marked this pull request as ready for review October 4, 2024 19:09
Copy link
Collaborator

@ACassimiro ACassimiro left a comment

Choose a reason for hiding this comment

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

I'd like to highlight that this approach of having traits calling static functions should not work (on off-the-shelf Rust, at least). If I'm not mistaken, it'd trigger the cannot call associated function on trait without specifying the corresponding "impl" type error.

Even so, this would not prevent this program from being executed in our semantics.

Edit: The error above is for a static function in a trait. The scenario we test here would rather yield this error: expected function, tuple struct or tuple variant, found trait.

@virgil-serbanuta
Copy link
Member Author

I'd like to highlight that this approach of having traits calling static functions should not work (on off-the-shelf Rust, at least). If I'm not mistaken, it'd trigger the cannot call associated function on trait without specifying the corresponding "impl" type error.

Even so, this would not prevent this program from being executed in our semantics.

Edit: The error above is for a static function in a trait. The scenario we test here would rather yield this error: expected function, tuple struct or tuple variant, found trait.

So, I know that this is an issue. As soon as you implement structs (if you do implement them), feel free to change the tests. However, note that, unless we stop automatically implementing storage (which is certainly an option), contracts must still be traits.

@virgil-serbanuta virgil-serbanuta merged commit c4ac5b0 into main Oct 7, 2024
2 checks passed
@virgil-serbanuta virgil-serbanuta deleted the absolute-names branch October 7, 2024 12:17
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