package be.kuleuven.cs.distrinet.jnome.core.type;

import org.aikodi.chameleon.oo.type.Type;
import org.aikodi.chameleon.oo.type.generics.FormalParameterType;
import org.aikodi.chameleon.oo.type.generics.FormalTypeParameter;
import org.aikodi.chameleon.oo.type.generics.LazyFormalAlias;

public class JavaLazyFormalAlias extends LazyFormalAlias implements JavaType {

  public JavaLazyFormalAlias(String name, FormalTypeParameter param) {
    super(name, param);
  }

  @Override
  public Type erasure() {
    return this;
  }
  
  @Override
  public FormalParameterType cloneSelf() {
    return new JavaLazyFormalAlias(name(), parameter());
  }

}

@@ -76,20 +76,124 @@
 eon.
-oo.type.Type
+core.lookup.LookupException;%0Aimport org.aikodi.chameleon.oo.type.Type;%0Aimport org.aikodi.chameleon.oo.type.TypeFixer
 ;%0Aim
@@ -742,12 +742,337 @@
 ());%0A  %7D
+%0A  %0A  @Override%0A  public boolean upperBoundNotHigherThan(Type other, TypeFixer trace) throws LookupException %7B%0A    if(trace.contains(other, parameter())) %7B%0A      return true;%0A    %7D %0A    if(sameAs(other)) %7B%0A      return true;%0A    %7D%0A    trace.add(other, parameter());%0A    return super.upperBoundNotHigherThan(other, trace);%0A  %7D
 %0A%0A%7D%0A

Update the type fixer to avoid an infinite loop for recursively defined captured type parameters