Minor. Fixed references to KotlinBuiltIns.UNIT_ALIAS.
This commit is contained in:
@@ -336,7 +336,7 @@ public class JetPsiUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
return KotlinBuiltIns.getInstance().UNIT_ALIAS.getName().equals(typeReference.getText());
|
||||
return KotlinBuiltIns.UNIT_ALIAS.getName().equals(typeReference.getText());
|
||||
}
|
||||
|
||||
public static boolean isSafeCall(@NotNull Call call) {
|
||||
|
||||
+1
-1
@@ -847,7 +847,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
JetType result;
|
||||
if (operationType == JetTokens.PLUSPLUS || operationType == JetTokens.MINUSMINUS) {
|
||||
if (JetTypeChecker.INSTANCE.isSubtypeOf(returnType, KotlinBuiltIns.getInstance().getUnitType())) {
|
||||
result = ErrorUtils.createErrorType(KotlinBuiltIns.getInstance().UNIT_ALIAS.getName());
|
||||
result = ErrorUtils.createErrorType(KotlinBuiltIns.UNIT_ALIAS.getName());
|
||||
context.trace.report(INC_DEC_SHOULD_NOT_RETURN_UNIT.on(operationSign));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -114,7 +114,7 @@ public class DescriptorRenderer implements Renderer<DeclarationDescriptor> {
|
||||
return escape(type.toString());
|
||||
}
|
||||
else if (KotlinBuiltIns.getInstance().isUnit(type)) {
|
||||
return escape(KotlinBuiltIns.getInstance().UNIT_ALIAS + (type.isNullable() ? "?" : ""));
|
||||
return escape(KotlinBuiltIns.UNIT_ALIAS + (type.isNullable() ? "?" : ""));
|
||||
}
|
||||
else if (KotlinBuiltIns.getInstance().isTupleType(type)) {
|
||||
return escape(renderTupleType(type, shortNamesOnly));
|
||||
|
||||
Reference in New Issue
Block a user