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

[Bug] Import usage in circuit functions #557

Closed
howardwu opened this issue Jan 19, 2021 · 3 comments
Closed

[Bug] Import usage in circuit functions #557

howardwu opened this issue Jan 19, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@howardwu
Copy link
Member

🐛 Bug Report

Unable to use imported types in circuit functions.

Code snippet to reproduce

import core.unstable.blake2s.Blake2s;

circuit Foo {
    function foo() -> [u8; 32] {
        return Blake2s::hash([0u8; 32], [0u8; 32])
    }
}

function main(a: u32, b: u32) -> u32 {
    let x = Foo::foo();
    return 5
}

Stack trace & error message

     |
   5 |          return Blake2s::hash([0u8; 32], [0u8; 32])
     |                 ^^^^^^^
     |
     = Cannot find value `Blake2s` in this scope

Error: Crate("leo-compiler", "Program failed due to previous error")

(Write what you expected to happen here)

Your Environment

  • Leo v1.0.8
@howardwu howardwu added the bug Something isn't working label Jan 19, 2021
@damons
Copy link

damons commented Jan 22, 2021

Will this be fixed by the ASG patch?

@Protryon
Copy link
Contributor

This will be fixed by ASG patch.

@Protryon
Copy link
Contributor

Protryon commented Feb 3, 2021

fixed by asg

@Protryon Protryon closed this as completed Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants