fuzion
fuzion copied to clipboard
`StackOverflowError` after syntax error for single-line feature with post-condition.
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 stack: implFldOrRout, routOrField, feature, expr, exprs, block, unit
error 2: java.lang.StackOverflowError
at dev.flang.ast.Expr.typeForInferencing(Expr.java:201)
at dev.flang.ast.Expr.type(Expr.java:167)
at dev.flang.ast.Expr.typeForInferencing(Expr.java:201)
at dev.flang.ast.Expr.type(Expr.java:167)
at dev.flang.ast.Expr.typeForInferencing(Expr.java:201)
at dev.flang.ast.Expr.type(Expr.java:167)
at dev.flang.ast.Expr.typeForInferencing(Expr.java:201)
And there are two problems: first, this should not crash with a StackOverflowError. Then, there should be some valid syntax to declare a single-line feature with a post condition.