Fridtjof Siebert
Fridtjof Siebert
Type features of anonymous types that correspond to non-contructor features are distinguished by unique ids. These ids are currently unique only within one module, so there could still be clashes...
Since a redefinition inherits the `pre`- and `post`-conditions, not requiring `redef` when implementing an abstract feature is a little confusing. Maybe a different keyword `override`, `implement`, etc. would help?
This code ``` _ := n n => if true then n else panic "n" ``` crashes `fz` ``` > ./build//bin/fz test_empty_stack.fz error 1: java.util.EmptyStackException at java.base/java.util.Stack.peek(Stack.java:101) at java.base/java.util.Stack.pop(Stack.java:83) at...
Redefined features should inherit the original feature's contract, combine it when `pre else` or `post then` is present and check it at runtime.
The code ``` return CExpr.call("clock", new List()) .mul(CExpr.uint64const(1_000_000_000)) .div(CExpr.ident("CLOCKS_PER_SEC")) .ret(); ``` may result in an overflow, see the documentatrion of clock: _The C standard allows for arbitrary values at the...
After #1187 has been pulled in, the following example works interpreted, but causes a warning in the C backend: ``` a Any is a.this b(x i32) Any is b.this _...
First step to support inheritance of post-conditions. For now, post conditions from redefined features are cloned and added to the redefining feature. This works as long as the post-conditions are...
this happens: ``` > ./build/bin/fz -e "f i32 post true => 42" command line:2:1: error 1: Syntax error: expected 'is', ':=' or '{', found end-of-file ^ While parsing: impl, parse...
I am very confused right now: the following line `8 % 5 = 3` behaves correctly: ``` > ./build/bin/fz -e "say (8 % 5 = 3)" true ``` However, suing...
This code has no effect ``` > ./build/bin/fz -e "_ := set_exit_code 1"; echo $? 0 ``` unless `exit` is called explicitly: ``` > ./build/bin/fz -e "_ := set_exit_code 1;...