Langium version: the one that runs on https://langium.org/showcase/arithmetics/
Package name: the one that runs on https://langium.org/showcase/arithmetics/
Steps To Reproduce
Run the code provided below in https://langium.org/showcase/arithmetics/
Link to code example:
Module basicMath
def sqrt(x):
x(2);
Sqrt(81);
The current behavior
Passes validation, and evaluates to 81.
The expected behavior
This should really fail validation because the language's grammar doesn't permit higher-order function, so any parameter used at the function position is definitely incorrect. But it doesn't fail the validation. In fact, the grammar explicitly permits it for an unknown reason.
On evaluation, it also simply returns the parameter, discarding 2, which also seems wrong
Langium version: the one that runs on https://langium.org/showcase/arithmetics/
Package name: the one that runs on https://langium.org/showcase/arithmetics/
Steps To Reproduce
Run the code provided below in https://langium.org/showcase/arithmetics/
Link to code example:
The current behavior
Passes validation, and evaluates to 81.
The expected behavior
This should really fail validation because the language's grammar doesn't permit higher-order function, so any parameter used at the function position is definitely incorrect. But it doesn't fail the validation. In fact, the grammar explicitly permits it for an unknown reason.
On evaluation, it also simply returns the parameter, discarding
2, which also seems wrong