Fix build after subtle change of Enum.name from function to property
This commit is contained in:
+2
-2
@@ -44,7 +44,7 @@ public enum JvmPrimitiveType {
|
||||
|
||||
for (JvmPrimitiveType type : values()) {
|
||||
WRAPPERS_CLASS_NAMES.add(type.getWrapperFqName());
|
||||
TYPE_BY_NAME.put(type.getName(), type);
|
||||
TYPE_BY_NAME.put(type.getJavaKeywordName(), type);
|
||||
TYPE_BY_PRIMITIVE_TYPE.put(type.getPrimitiveType(), type);
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public enum JvmPrimitiveType {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getName() {
|
||||
public String getJavaKeywordName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ class DefaultExpressionConverter : JavaElementVisitor(), ExpressionConverter {
|
||||
override fun visitClassObjectAccessExpression(expression: PsiClassObjectAccessExpression) {
|
||||
val operand = expression.getOperand()
|
||||
val typeName = operand.getType().getCanonicalText()
|
||||
val primitiveType = JvmPrimitiveType.values().firstOrNull { it.getName() == typeName }
|
||||
val primitiveType = JvmPrimitiveType.values().firstOrNull { it.getJavaKeywordName() == typeName }
|
||||
val wrapperTypeName = if (primitiveType != null) {
|
||||
primitiveType.getWrapperFqName()
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.j2k.ast.*
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmPrimitiveType
|
||||
|
||||
private val PRIMITIVE_TYPES_NAMES = JvmPrimitiveType.values().map { it.getName() }
|
||||
private val PRIMITIVE_TYPES_NAMES = JvmPrimitiveType.values().map { it.getJavaKeywordName() }
|
||||
|
||||
class TypeVisitor(
|
||||
private val converter: Converter,
|
||||
|
||||
Reference in New Issue
Block a user