Skip to content

#770 PLCgen: Types in expressions, check them.

Albert Hofkamp requested to merge 770-handle-func-blocks into develop
  • Changes:
    • Adds a function block type to use a variable type.
    • Function block description knows the type name, and takes an abstract result type (like regular function descriptions)
    • Function block variables are just normal variables now
    • Function block applications take the variable as that has all the needed data.
    • Compute the concrete type of a function application or function block application. All expression classes now have type, thus dropping the null type cases.
    • Fix errors in the function definitions.
    • Cast expression uses the type of the child expression.
    • Some tests are impossible now due to the new type restrictions
    • Types in timer handling were a mess, fixed it.
    • Check types in assignment and guards of an IF statement. (Didn't cause new problems.)
    • Update test expectations for the modified timer code.

The only end user visible change is that this fixes timers.

Adresses #770 (closed)

Edited by Dennis Hendriks

Merge request reports