File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import java.lang.reflect.Constructor
14
14
import java.lang.reflect.Executable
15
15
import java.lang.reflect.Field
16
16
import java.lang.reflect.Method
17
+ import java.lang.reflect.ParameterizedType
17
18
import java.lang.reflect.Type
18
19
import java.util.concurrent.atomic.AtomicInteger
19
20
import kotlin.contracts.ExperimentalContracts
@@ -268,10 +269,11 @@ val Class<*>.id: ClassId
268
269
}
269
270
270
271
/* *
271
- * [java.lang.reflect.ParameterizedType.getRawType] now returns [Type] instead of [Class].
272
+ * We should specially handle the case of a generic type that is a [Type] and not a [Class].
273
+ * Returns a [ClassId] for the corresponding raw type.
272
274
*/
273
- val Type .id: ClassId
274
- get() = TODO ( " Java 11 transition " )
275
+ val ParameterizedType .id: ClassId
276
+ get() = ClassId ( this .rawType.typeName )
275
277
276
278
val KClass <* >.id: ClassId
277
279
get() = java.id
Original file line number Diff line number Diff line change @@ -1292,7 +1292,7 @@ internal class CgMethodConstructor(val context: CgContext) : CgContextOwner by c
1292
1292
1293
1293
val argumentType = when {
1294
1294
paramType is Class <* > && paramType.isArray -> paramType.id
1295
- paramType is ParameterizedType -> paramType.rawType. id
1295
+ paramType is ParameterizedType -> paramType.id
1296
1296
else -> ClassId (paramType.typeName)
1297
1297
}
1298
1298
You can’t perform that action at this time.
0 commit comments