minor cleanup

This commit is contained in:
hneemann 2021-01-06 22:09:26 +01:00
parent 6f5cbdc138
commit f793054c89

View File

@ -132,14 +132,13 @@ public class ResolveGenerics {
boolean isCustom = elementTypeDescription instanceof ElementTypeDescriptionCustom; boolean isCustom = elementTypeDescription instanceof ElementTypeDescriptionCustom;
Statement genS = getStatement(gen); Statement genS = getStatement(gen);
Context mod = createContext(c, newComponents); Context mod = createContext(c, newComponents)
.declareVar("args", args);
if (isCustom) { if (isCustom) {
mod.declareVar("args", args) mod.declareFunc("setCircuit", new SetCircuitFunc(ve));
.declareFunc("setCircuit", new SetCircuitFunc(ve));
genS.execute(mod); genS.execute(mod);
} else { } else {
mod.declareVar("args", args) mod.declareVar("this", new SubstituteLibrary.AllowSetAttributes(elementAttributes));
.declareVar("this", new SubstituteLibrary.AllowSetAttributes(elementAttributes));
genS.execute(mod); genS.execute(mod);
} }
elementAttributes.putToCache(GEN_ARGS_KEY, mod); elementAttributes.putToCache(GEN_ARGS_KEY, mod);