spicy
spicy copied to clipboard
Cannot initialize a `const` with the result of a function call
As of spicyc v1.11.0-dev.168 (b8776965e) it seems impossible to initialize a const with the result of a function call,
module foo;
function bar(): uint16 {
return 4711;
}
# error: use of undeclared identifier 'bar'
# || const ::hilti::rt::integer::safe<uint16_t> xs = bar();
# || ^
const xs = bar();
We should either allow this, or reject it explicitly.