At first I defined abs as type Node and ASTBuilder works, but after switching to Abs, it broke
public static class App extends Node {
public final Abs abs;
public final Node param;
guess it is due to (lambda x. x) (lambda x. x x);, in (lambda x. x x) there is a application and x is a var instead of a abs, it can become abs if some one bind it, the var here can be anything ... and (lambda x. x x) seems never terminate?
java.lang.ClassCastException: me.at15.tapl.untyped.UntypedAst$Var cannot be cast to me.at15.tapl.untyped.UntypedAst$Abs
At first I defined
abs
as typeNode
and ASTBuilder works, but after switching toAbs
, it brokeguess it is due to
(lambda x. x) (lambda x. x x);
, in(lambda x. x x)
there is a application andx
is a var instead of a abs, it can become abs if some one bind it, the var here can be anything ... and(lambda x. x x)
seems never terminate?