Michael

Results 35 comments of Michael

Hey, sorry for the radio silence. Been under the weather these past couple of days. I should have a PR ready soon, just need to sort out tests and the...

While I agree with this to some extend, this behaviour is partially due to the default string size. If we take your example from above but change it like so:...

> Sounds like a big-ish refactor, not sure we want to do that if there are no other benefits other than the validation? Yes, it would likely involve a large...

Looks like a validation for this has been added with #951. That fixes the issue of hitting unreachables/panics, but we are still unable to directly bit-access into structs, so I...

I have reduced the reproducible example down a little: ``` TYPE OUT_TYPE : STRUCT a : BYTE; END_STRUCT; END_TYPE FUNCTION_BLOCK FB VAR_OUTPUT output : OUT_TYPE; END_VAR END_FUNCTION_BLOCK PROGRAM PRG VAR...

This happens here: https://github.com/PLC-lang/rusty/blob/b357a05cb064eb21fed110b6d7c5f543f72c18e8/src/codegen/generators/expression_generator.rs#L574-L579 `generate_string_store` then expects a string and will fail on any other type. Simply commenting out the `OR`ed conditions for structs and arrays will get rid of...

This seems to be a diagnostics severity problem. Invalid assignment should be an error, not a warning - then we also would not enter codegen and no panic would be...

To me this sounds more like an either/or situation - if we introduce critical diagnostics with a fixed severity, then we no longer need to change the unreachable statements in...

Currently blocked by - [x] Tests causing segfaults: ``` SIGSEGV [ 0.099s] rusty::tests correctness::functions::mux_string_literal SIGSEGV [ 0.091s] rusty::tests correctness::functions::mux_string_ref SIGSEGV [ 0.060s] rusty::tests correctness::functions::sel_string_literal SIGSEGV [ 0.058s] rusty::tests correctness::functions::sel_string_ref SIGSEGV...

There are similar problems for array-type arguments with the `SEL` function - the type reported in the error message defaults to `LREAL` for both left and right in different messages...