Value declaration compiles to unit #295
Labels
Component: code generation
Something that concerns the generated code
Priority: low
Status: specified
Enhancement that is ready to implement
Type: bug
Something isn't working
Summary
The value of a value declaration is supposed to be its expression, but it compiles to
unit
Todo
Reproduction
Given:
func valDec() -> int = val x = 7
, run Spoofax > Generate > JavaExpected: generates
Actual: generates
Details
Value declarations used to have unit type and value. The intended semantics were changed to be the type and value of the expression that is assigned. Static analysis correctly gives no errors on the example function, but the compiler still generates
UnitLit()
The text was updated successfully, but these errors were encountered: