rusty icon indicating copy to clipboard operation
rusty copied to clipboard

Invalid double-deref on a pointer ends in a panic in codegen

Open mhasel opened this issue 9 months ago • 0 comments

Describe the bug If I have a pointer with one level of indirection and try to dereference it twice, the compilation ends in a panic in inkwell.

To Reproduce

      FUNCTION main : DINT 
        VAR
            ref: REF_TO INT;
        END_VAR
            ref^^; // invalid double deref on pointer
        END_FUNCTION

Expected behavior A diagnostic that a double deref is invalid in this case.

mhasel avatar Mar 28 '25 10:03 mhasel