public Type getType(Symbol sym) { if (sym == null) return null; if (sym == defs.ANY_CLASS || sym == defs.ANYREF_CLASS || sym == defs.OBJECT_CLASS) return OBJECT; if (sym == defs.STRING_CLASS) return STRING;  Type type = (Type) symbols2types.get(sym); if (type != null) { if (sym.isExternal()) { assert !(type instanceof TypeBuilder) : Debug.show(sym) + " -> " + type.toString(); return type; } else if (types2create.contains(sym) && type instanceof TypeBuilder) return type; } else if (types2create.contains(sym)) type = createType(sym); if (type != null) return type;  type = (Type)ti.getMember(sym); if (type != null) return map(sym, type);  if (sym.isClass()) { final Symbol owner = sym.owner(); if (owner.isClass()) { Type ownerType = getType(owner); assert ownerType != null : Debug.show(owner); type = ownerType.GetNestedType(sym.name.toString()); } else { String name = global.primitives.getCLRClassName(sym); type = getType(sym.isModuleClass() && !sym.isJava() ? name + "$" : name); } } else { type = getType(sym.info()); } if (type != null) return map(sym, type);  throw Debug.abort("Type resolution failed for " + Debug.show(sym));
private Type getType(String name) { return ti.getType(name);
    public Type getType(Symbol sym) {	if (sym == null) return null; // FIXME: assert sym != null ?	if (sym == defs.ANY_CLASS || sym == defs.ANYREF_CLASS || sym == defs.OBJECT_CLASS)	    return OBJECT;	if (sym == defs.STRING_CLASS)	    return STRING;	Type type = (Type) symbols2types.get(sym);	if (type != null) {	    if (sym.isExternal()) {		assert !(type instanceof TypeBuilder)		    : Debug.show(sym) + " -> " + type.toString();		return type;	    } else if (types2create.contains(sym) && type instanceof TypeBuilder)		return type;	} else if (types2create.contains(sym))	    type = createType(sym);	if (type != null)	    return type;	type = (Type)ti.getMember(sym);	if (type != null)	    return map(sym, type);	if (sym.isClass()) {	    final Symbol owner = sym.owner();	    if (owner.isClass()) {		Type ownerType = getType(owner);		assert ownerType != null : Debug.show(owner);		type = ownerType.GetNestedType(sym.name.toString());	    } else {		String name = global.primitives.getCLRClassName(sym);		type = getType(sym.isModuleClass() && !sym.isJava()			       ? name + "$" : name);	    }	} else {	    type = getType(sym.info());	}	if (type != null)	    return map(sym, type);	throw Debug.abort("Type resolution failed for " + Debug.show(sym));    }