COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT is an ERROR now.
Migrated code. Updated test data in IDE tests. Dropped whenWithRangeTestsAndMultiConditions.kt: "Introduce subject" is not applicable to 'when' with ||-ed conditions.
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ public abstract class ReflectJavaType : JavaType {
|
||||
fun create(type: Type): ReflectJavaType {
|
||||
return when {
|
||||
type is Class<*> && type.isPrimitive() -> ReflectJavaPrimitiveType(type)
|
||||
type is GenericArrayType, type is Class<*> && type.isArray() -> ReflectJavaArrayType(type)
|
||||
type is GenericArrayType || type is Class<*> && type.isArray() -> ReflectJavaArrayType(type)
|
||||
type is WildcardType -> ReflectJavaWildcardType(type)
|
||||
else -> ReflectJavaClassifierType(type)
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public val Class<*>.classId: ClassId
|
||||
get() = when {
|
||||
isPrimitive() -> throw IllegalArgumentException("Can't compute ClassId for primitive type: $this")
|
||||
isArray() -> throw IllegalArgumentException("Can't compute ClassId for array type: $this")
|
||||
getEnclosingMethod() != null, getEnclosingConstructor() != null, getSimpleName().isEmpty() -> {
|
||||
getEnclosingMethod() != null || getEnclosingConstructor() != null || getSimpleName().isEmpty() -> {
|
||||
val fqName = FqName(getName())
|
||||
ClassId(fqName.parent(), FqName.topLevel(fqName.shortName()), /* local = */ true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user