if(typeParameter != null)
return typeParameter;
}
if(!isBootstrap || !name.startsWith(CEYLON_LANGUAGE)) {
if(scope != null && pkgName != null){
Package containingPackage = Decl.getPackageContainer(scope);
Package pkg = containingPackage.getModule().getPackage(pkgName);
String relativeName = null;
String unquotedName = name.replace("$", "");
if(!pkgName.isEmpty()){
if(unquotedName.startsWith(pkgName+"."))
relativeName = unquotedName.substring(pkgName.length()+1);
// else we don't try it's not in this package
}else
relativeName = unquotedName;
if(relativeName != null && pkg != null){
Declaration declaration = pkg.getDirectMember(relativeName, null, false);
// if we get a value, we want its type
if(Decl.isValue(declaration)
&& ((Value)declaration).getTypeDeclaration().getName().equals(relativeName))
declaration = ((Value)declaration).getTypeDeclaration();
if(declaration != null)