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

Aliases can make compilation fail with "missing core dependencies`" & Could not generate entry method #6569

Open
DefiCake opened this issue Sep 19, 2024 · 0 comments · May be fixed by #6628
Assignees
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen

Comments

@DefiCake
Copy link
Member

Related Component

compiler

Problem

Using an enum alias as a return type confuses the compiler and makes it fail on build.

contract;

use standards::src5::{SRC5, State as SRC5State};


configurable {
    INITIAL_OWNER: SRC5State = SRC5State::Initialized(Identity::Address(Address::zero()))
}

impl SRC5 for Contract {
    #[storage(read)]
    fn owner() -> SRC5State {
        INITIAL_OWNER
    }
}

Here, just renaming SRC5State back to State will make the build pass.

Steps

See reproduction: https://github.com/DefiCake/forc-alias-compilation-error

Possible Solution(s)

No response

Notes

No response

Installed components

forc --version
forc 0.63.5
@DefiCake DefiCake added bug Something isn't working triage This issue was opened with a template and needs to be triaged by code owners. labels Sep 19, 2024
@xunilrj xunilrj self-assigned this Oct 9, 2024
@IGI-111 IGI-111 added compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen and removed triage This issue was opened with a template and needs to be triaged by code owners. labels Oct 11, 2024
@xunilrj xunilrj linked a pull request Oct 16, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants