public Binding getTypeOrPackage(char[] name, int mask) {
	Binding typeBinding = getBinding0(name, mask);
//	if (typeBinding != null && typeBinding != LookupEnvironment.TheNotFoundType) {
//		typeBinding = BinaryTypeBinding.resolveType(typeBinding, environment, false); // no raw conversion for now
//		if (typeBinding.isNestedType())
//			return new ProblemReferenceBinding(name, typeBinding, ProblemReasons.InternalNameProvided);
//		return typeBinding;
//	}
	if (typeBinding!=null)
		return typeBinding;

	PackageBinding packageBinding = getPackage0(name);
	if (packageBinding != null)
		return packageBinding;

	if (typeBinding == null && mask!=Binding.PACKAGE) { // have not looked for it before
		if ((typeBinding = environment.askForBinding(this, name,mask)) != null) {
//			if (typeBinding.isNestedType())
//				return new ProblemReferenceBinding(name, typeBinding, ProblemReasons.InternalNameProvided);
			return typeBinding;
		}

		// Since name could not be found, add a problem binding
		// to the collections so it will be reported as an error next time.
		addNotFoundBinding(name, mask);
	}

	if (packageBinding == null) { // have not looked for it before
		if ((packageBinding = findPackage(name)) != null)
			return packageBinding;
	}

	return null;
}