use of org.abs_models.frontend.ast.VarOrFieldDecl in project abstools by abstools.
the class VarResolutionTest method testNestedLetExp4.
@Test
public void testNestedLetExp4() {
Model m = assertParse(" def Bool f(Bool b) = let (Bool x) = b in let (Bool x) = b in x;");
LetExp e = (LetExp) getFirstFunctionExpr(m);
LetExp e2 = (LetExp) e.getExp();
VarOrFieldDecl decl = e2.getVar();
VarUse u = (VarUse) e2.getExp();
assertEquals(decl, u.getDecl());
}
use of org.abs_models.frontend.ast.VarOrFieldDecl in project abstools by abstools.
the class VarResolutionTest method testLetExp.
@Test
public void testLetExp() {
Model m = assertParse(" def Bool f(Bool b) = let (Bool x) = b in x;");
LetExp e = (LetExp) getFirstFunctionExpr(m);
VarOrFieldDecl decl = e.getVar();
VarUse u = (VarUse) e.getExp();
assertEquals(decl, u.getDecl());
}
use of org.abs_models.frontend.ast.VarOrFieldDecl in project abstools by abstools.
the class VarResolutionTest method testNestedLetExp.
@Test
public void testNestedLetExp() {
Model m = assertParse(" def Bool f(Bool b) = let (Bool x) = let (Bool y) = b in y in x;");
LetExp e = (LetExp) getFirstFunctionExpr(m);
VarOrFieldDecl decl = e.getVar();
VarUse u = (VarUse) e.getExp();
assertEquals(decl, u.getDecl());
}
Aggregations