* Get the concrete type pointed to by a chain of type meta-variables.
*/
public static Type canonical(Type type) {
- while(type instanceof TMetaVar) {
+ if(type instanceof TMetaVar) {
TMetaVar metaVar = (TMetaVar)type;
type = metaVar.ref;
if(type == null)
return metaVar;
+ else
+ return metaVar.ref = canonical(type);
}
return type;
}