Rename KotlinBuiltIns.isAny -> isAnyOrNullableAny
Reduce confusion, prevent bugs
This commit is contained in:
@@ -939,7 +939,7 @@ public class KotlinBuiltIns {
|
||||
&& type.getConstructor() == getNothing().getTypeConstructor();
|
||||
}
|
||||
|
||||
public boolean isAny(@NotNull JetType type) {
|
||||
public boolean isAnyOrNullableAny(@NotNull JetType type) {
|
||||
return !(type instanceof NamespaceType) &&
|
||||
type.getConstructor() == getAny().getTypeConstructor();
|
||||
}
|
||||
|
||||
@@ -636,7 +636,8 @@ public class DescriptorRendererImpl implements DescriptorRenderer {
|
||||
|
||||
if (!klass.equals(KotlinBuiltIns.getInstance().getNothing())) {
|
||||
Collection<JetType> supertypes = klass.getTypeConstructor().getSupertypes();
|
||||
if (supertypes.isEmpty() || !alwaysRenderAny && supertypes.size() == 1 && KotlinBuiltIns.getInstance().isAny(supertypes.iterator().next())) {
|
||||
if (supertypes.isEmpty() || !alwaysRenderAny && supertypes.size() == 1 && KotlinBuiltIns.getInstance().isAnyOrNullableAny(
|
||||
supertypes.iterator().next())) {
|
||||
}
|
||||
else {
|
||||
builder.append(" : ");
|
||||
|
||||
Reference in New Issue
Block a user