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

Error messages for type variables use the wrong name #4789

Closed
Marwes opened this issue May 25, 2022 · 0 comments · Fixed by #4797
Closed

Error messages for type variables use the wrong name #4789

Marwes opened this issue May 25, 2022 · 0 comments · Fixed by #4797

Comments

@Marwes
Copy link
Contributor

Marwes commented May 25, 2022

Due to the convert pass renaming all variables in each builtin statement, any errors referring to these variables will not match what the source says. We should change the convert pass to ensure that they match

From #4788 (the error refers to B, which does not exist in the signature)

#[test]
fn variables_used_in_label_position_must_have_label_kind() {
    test_error_msg! {
        config: AnalyzerConfig{
            features: vec![Feature::LabelPolymorphism],
            ..AnalyzerConfig::default()
        },
        src: r#"
            builtin abc: (record: { A with T: time }, ?timeColumn: T = "_time") => int
        "#,
        expect: expect![[r#"
            error: variable B lacks the Label constraint
              ┌─ main:2:13

            2 │             builtin abc: (record: { A with T: time }, ?timeColumn: T = "_time") => int
              │             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        "#]],
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant