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

Turbofish operator does not work #5077

Closed
LogvinovLeon opened this issue May 22, 2024 · 1 comment
Closed

Turbofish operator does not work #5077

LogvinovLeon opened this issue May 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@LogvinovLeon
Copy link
Contributor

Aim

Use turbofish on a simple method

Expected Behavior

Compiles

Bug

error: expected type Field, found type ()
  ┌─ /Users/leonidlogvinov/Dev/ZK/trait_repro/src/main.nr:3:18
  │
3 │   fn main() -> pub Field {
  │                    ----- expected Field because of return type
  │ ╭────────────────────────'
4 │ │     fun::<2>()
5 │ │ }
  │ ╰─' () returned here
  │

error: Unexpected ::, expected one of binary operator, Ident
  ┌─ /Users/leonidlogvinov/Dev/ZK/trait_repro/src/main.nr:4:8
  │
4 │     fun::<2>()
  │        ---
  │

Aborting due to 2 previous errors

To Reproduce

fn main() -> pub Field {
    fun::<2>()
}

fn fun<N>() -> Field {
    0
}

Project Impact

Nice-to-have

Impact Context

No response

Workaround

Yes

Workaround Description

Not use turbofish

Additional Context

No response

Installation Method

None

Nargo Version

nargo version = 0.30.0

NoirJS Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@LogvinovLeon LogvinovLeon added the bug Something isn't working label May 22, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 22, 2024
@TomAFrench
Copy link
Member

#3542 (comment)

@TomAFrench TomAFrench closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir May 22, 2024
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
Status: Done
Development

No branches or pull requests

2 participants