use of ast.Expression.ClassB.MethodImplemented in project L42 by ElvisResearchGroup.
the class Desugar method visit.
public MethodImplemented visit(MethodImplemented mi) {
this.usedVars = new HashSet<String>();
this.varEnv = new HashMap<String, Type>();
String mName = desugarName(mi.getS().nameToS());
mi = mi.withS(mi.getS().withName(mName));
for (String name : mi.getS().getNames()) {
usedVars.add(name);
List<Ast.MethodSelectorX> msxsi = new ArrayList<>();
msxsi.add(new Ast.MethodSelectorX(mi.getS(), name));
varEnv.put(name, null);
}
usedVars.add("this");
List<Ast.MethodSelectorX> msxsi = new ArrayList<>();
msxsi.add(new Ast.MethodSelectorX(mi.getS(), "this"));
//varEnv.put("this",new Ast.HistoricType(Path.outer(0),msxsi,Doc.empty()));
List<Ast.MethodSelectorX> msxs = new ArrayList<>();
msxs.add(new Ast.MethodSelectorX(mi.getS(), ""));
usedVars.addAll(CollectDeclaredVars.of(mi.getInner()));
//final restrictions
final MethodImplemented mi2 = mi;
return withExpectedType(null, () -> super.visit(mi2));
//well... this is an issue> method desugaring for method implemented does not know its return type?
}
Aggregations