Do not wrap built-in function in JetLightClass (EA-38770)

Built-in top-level functions are located in jet.namespace class.
JetStandardClasses.isStandardClass() now checks that a given fqName starts with
"jet.", instead of searching it in the standard scope, to prevent this kind of
errors in the future
This commit is contained in:
Alexander Udalov
2012-09-27 16:07:45 +04:00
parent acf8702ccf
commit 38a42bdb79
3 changed files with 17 additions and 6 deletions
@@ -613,11 +613,6 @@ public class JetStandardClasses {
}
public static boolean isStandardClass(@NotNull FqName fqName) {
for (DeclarationDescriptor descriptor : getAllStandardClasses()) {
if (DescriptorUtils.getFQName(descriptor).equals(fqName.toUnsafe())) {
return true;
}
}
return false;
return JetStandardClasses.STANDARD_CLASSES_FQNAME.equals(fqName.parent());
}
}