Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions latte/src/main/java/typechecking/LatteClassFirstPass.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public LatteClassFirstPass(SymbolicEnvironment se, PermissionEnvironment pe,
public <T> void visitCtClass(CtClass<T> ctClass) {
logInfo("Visiting class: " + ctClass.getSimpleName());
// Add the class to the type reference and class map
CtTypeReference<?> typeRef = ctClass.getReference();
maps.addTypeClass(typeRef, ctClass);
CtTypeReference<?> typeRef1 = ctClass.getReference();
maps.addTypeClass(typeRef1, ctClass);
super.visitCtClass(ctClass);
}

Expand Down
4 changes: 2 additions & 2 deletions latte/src/main/java/typechecking/LatteTypeChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ public <T> void visitCtInvocation(CtInvocation<T> invocation) {
if (invocation.getTarget() == null){
logError("Invocation needs to have a target but found none -", invocation);
}
CtTypeReference<?> e = invocation.getTarget().getType();
CtTypeReference<?> e = invocation.getTarget().getType().getTypeErasure();

// method(Γ(𝑥), 𝑓 ) = 𝛼 𝐶 𝑚(𝛼0 𝐶0 this, 𝛼1 𝐶1 𝑥1, · · · , 𝛼𝑛 𝐶𝑛 𝑥𝑛 )
CtClass<?> klass = maps.getClassFrom(e);
CtMethod<?> m = maps.getCtMethod(klass, metName,
invocation.getArguments().size());

if (m == null){
logInfo(String.format("Cannot find method {} for {} in the context", metName, invocation.getType()));
logInfo("Cannot find method {" + metName + "} for {} in the context");
return;
}
List<SymbolicValue> paramSymbValues = new ArrayList<>();
Expand Down