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

Relate errors to macro built-ins errors #7459

Open
asterite opened this issue Feb 20, 2025 · 0 comments
Open

Relate errors to macro built-ins errors #7459

asterite opened this issue Feb 20, 2025 · 0 comments

Comments

@asterite
Copy link
Collaborator

asterite commented Feb 20, 2025

In #7333 we now should macro errors where they happen, together with why they happened (for example: a function attribute was running). However, this still misses a few cases, essentially when elaborate_in_function is used.

For example this program:

fn main() {
    comptime {
        let x = quote { Hello };
        let _ = x.as_type();
    }
}

gives this error:

error: Could not resolve 'Hello' in path
   ┌─ src/main.nr:11:25
   │
11 │         let x = quote { Hello };
   │                         -----

but it doesn't mention that it's because of the as_type() call.

We should also take this as an opportunity to address this comment: #7333 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant