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

Contract self impl #5905

Open
IGI-111 opened this issue Apr 23, 2024 · 0 comments
Open

Contract self impl #5905

IGI-111 opened this issue Apr 23, 2024 · 0 comments
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser good first issue Good for newcomers language feature Core language features visible to end users

Comments

@IGI-111
Copy link
Contributor

IGI-111 commented Apr 23, 2024

Allow self impl for contracts as a shorthand for an anonymous ABI spec.
The point is to not have to write an ABI type for very small contracts.

This:

contract;
impl Contract {
    fn foo() -> u64 { 0 }
}

Should produce the same binary and ABI spec as:

contract;
abi MyAbi {
    fn foo() -> u64;
}
impl MyAbi for Contract {
    fn foo() -> u64 { 0 }
}
@IGI-111 IGI-111 added good first issue Good for newcomers language feature Core language features visible to end users compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser good first issue Good for newcomers language feature Core language features visible to end users
Projects
None yet
Development

No branches or pull requests

1 participant