protected Type followImports(ErrorListener listener, Type type)
{
while(type.getType() == Type.IMPORT) {
Imported imported = (Imported)type;
if (imported.getModule() != _script) {
listener.error(_location, "Attempting to refer to '"+imported+"' in another module");
return null;
}
type = imported.getPointedType();
}
return type;
}