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

Unary expression + <REAL> panics on unimplemented!() #1171

Open
mhasel opened this issue Mar 20, 2024 · 1 comment
Open

Unary expression + <REAL> panics on unimplemented!() #1171

mhasel opened this issue Mar 20, 2024 · 1 comment
Labels
bug Something isn't working codegen low-priority

Comments

@mhasel
Copy link
Member

mhasel commented Mar 20, 2024

Describe the bug
Unary expressions with an explicit + operator on REALs will panic in


The same expression with INTs is fine.

To Reproduce
This came up while porting a project and the MRE boils down to this:

FUNCTION main: DINT
VAR
    r: REAL;
    i: INT;
END_VAR
    i := + 6; // this is fine
    r := + r; // hits `unimplemented!()` in `expression_generator.rs:400`
    r := + 6.0; // same as above
END_FUNCTION

Expected behavior
the expression + 6.0 behaving just like 6.0

@mhasel mhasel added the bug Something isn't working label Mar 20, 2024
@volsa
Copy link
Member

volsa commented Mar 21, 2024

Related PR #640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working codegen low-priority
Projects
None yet
Development

No branches or pull requests

2 participants