@@ -1701,12 +1701,13 @@ open class KotlinFileExtractor(
17011701
17021702 private fun extractSyntheticBody (b : IrSyntheticBody , callable : Label <out DbCallable >) {
17031703 with (" synthetic body" , b) {
1704- when (b.kind) {
1705- IrSyntheticBodyKind .ENUM_VALUES -> tw.writeKtSyntheticBody(callable, 1 )
1706- IrSyntheticBodyKind .ENUM_VALUEOF -> tw.writeKtSyntheticBody(callable, 2 )
1704+ val kind = b.kind
1705+ when {
1706+ kind == IrSyntheticBodyKind .ENUM_VALUES -> tw.writeKtSyntheticBody(callable, 1 )
1707+ kind == IrSyntheticBodyKind .ENUM_VALUEOF -> tw.writeKtSyntheticBody(callable, 2 )
1708+ kind == kind_ENUM_ENTRIES -> tw.writeKtSyntheticBody(callable, 3 )
17071709 else -> {
1708- // TODO: Support IrSyntheticBodyKind.ENUM_ENTRIES
1709- logger.errorElement(" Unhandled synthetic body kind " + b.kind.javaClass, b)
1710+ logger.errorElement(" Unhandled synthetic body kind " + kind, b)
17101711 }
17111712 }
17121713 }
@@ -5316,7 +5317,10 @@ open class KotlinFileExtractor(
53165317 private fun extractTypeAccessRecursive (t : IrType , location : Label <out DbLocation >, parent : Label <out DbExprparent >, idx : Int , typeContext : TypeContext = TypeContext .OTHER ): Label <out DbExpr > {
53175318 val typeAccessId = extractTypeAccess(useType(t, typeContext), location, parent, idx)
53185319 if (t is IrSimpleType ) {
5319- t.arguments.forEachIndexed { argIdx, arg ->
5320+ // From 1.9, the list might change when we call erase,
5321+ // so we make a copy that it is safe to iterate over.
5322+ val argumentsCopy = t.arguments.toList()
5323+ argumentsCopy.forEachIndexed { argIdx, arg ->
53205324 extractWildcardTypeAccessRecursive(arg, location, typeAccessId, argIdx)
53215325 }
53225326 }
0 commit comments