use of org.abs_models.frontend.ast.ParametricFunctionDecl in project abstools by abstools.
the class TypingTest method functionTypeArgs3.
@Test
public void functionTypeArgs3() {
Model m = assertParse(" def A f<A>(Maybe<A> o) = case o { Just(a) => a; } ;");
ParametricFunctionDecl d = getLastParametricFunctionDecl(m);
TypeParameterDecl typeParameter = d.getTypeParameter(0);
TypeParameter type = (TypeParameter) ((ExpFunctionDef) d.getFunctionDef()).getRhs().getType();
TypeParameterDecl decl = type.getDecl();
assertEquals(typeParameter, decl);
}
Aggregations