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

Invalid expression at code generation time #3107

Closed
FloVanGH opened this issue Jul 19, 2023 · 0 comments · Fixed by #3109
Closed

Invalid expression at code generation time #3107

FloVanGH opened this issue Jul 19, 2023 · 0 comments · Fixed by #3109
Assignees
Labels
a:language-slint Compiler for the .slint language (mO,bF) bug Something isn't working

Comments

@FloVanGH
Copy link
Member

FloVanGH commented Jul 19, 2023

After I try to compile the following code I get an internal error, encountered invalid expression at code generation time panic. In the preview the code works.

component TestComponent {
    in-out property <bool> check;
}

export component App inherits Window {
    min-width: 800px;
    min-height: 600px;
    title: "Test";

    Rectangle {
        i-test := TestComponent {}

        if (i-test.check) : Rectangle {}
    }
}

This works:

component TestComponent {
    in-out property <bool> check;
}

export component App inherits Window {
    min-width: 800px;
    min-height: 600px;
    title: "Test";

    Rectangle {
        i-test := TestComponent {}

        if (1 == 1) : Rectangle {}
    }
}

Tested with the crates release 1.1.1 and the current master.

@FloVanGH FloVanGH added bug Something isn't working a:language-slint Compiler for the .slint language (mO,bF) labels Jul 19, 2023
ogoffart added a commit that referenced this issue Jul 19, 2023
…_analysis

This is necessary for the `is_used` to be set properly

Fixes #3107
ogoffart added a commit that referenced this issue Jul 19, 2023
…_analysis

This is necessary for the `is_used` to be set properly

Fixes #3107
ogoffart added a commit that referenced this issue Jul 19, 2023
…_analysis (#3109)

This is necessary for the `is_used` to be set properly

Fixes #3107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:language-slint Compiler for the .slint language (mO,bF) bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants