rusty
rusty copied to clipboard
Alias declaration with invalid type panics on an `unwrap`
Describe the bug The following example will hit an unwrap in https://github.com/PLC-lang/rusty/blob/bca3c3179ea8752093e3b8654226fbc646b69a6f/src/validation/variable.rs#L246-L251 when the declared type does not exist.
To Reproduce
try to compile with --check:
VAR_GLOBAL
y: BOOL;
END_VAR
FUNCTION main
VAR
x AT y : SomeUndefinedType;
END_VAR
END_FUNCTION
Expected behavior
A diagnostic with Unknown type: SomeUndefinedType