whiley_test_file 0.6.2

An API for manipulating test files for the Whiley Programming Language.
Documentation
original.name="RecursiveType_Invalid_5"
======
>>> main.whiley
type Expr is int | Var | BinOp

type BinOp is {Expr rhs, Expr lhs}

type Var is {string id}

type SyntaxError is {string err}

type SExpr is SyntaxError | Expr

function build(int i) -> SExpr:
    if i > 10:
        return {id: "var"}
    else:
        if i > 0:
            return i
        else:
            return {rhs: sbuild(i + 1), lhs: sbuild(i + 10)}

function sbuild(int i) -> SExpr:
    if i > 20:
        return {err: "error"}
    else:
        return build(i)

---
E407 main.whiley 5,13:18
E407 main.whiley 7,21:26