File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed
kotlin-extractor/src/main/kotlin Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -1701,12 +1701,13 @@ open class KotlinFileExtractor(
1701
1701
1702
1702
private fun extractSyntheticBody (b : IrSyntheticBody , callable : Label <out DbCallable >) {
1703
1703
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 )
1707
1709
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)
1710
1711
}
1711
1712
}
1712
1713
}
Original file line number Diff line number Diff line change
1
+ package com.github.codeql.utils.versions
2
+
3
+ import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind
4
+
5
+ val kind_ENUM_ENTRIES: IrSyntheticBodyKind ? = null
6
+
Original file line number Diff line number Diff line change
1
+ package com.github.codeql.utils.versions
2
+
3
+ import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind
4
+
5
+ val kind_ENUM_ENTRIES: IrSyntheticBodyKind ? = IrSyntheticBodyKind .ENUM_ENTRIES
6
+
Original file line number Diff line number Diff line change @@ -1219,6 +1219,7 @@ ktSyntheticBody(
1219
1219
int kind: int ref
1220
1220
// 1: ENUM_VALUES
1221
1221
// 2: ENUM_VALUEOF
1222
+ // 3: ENUM_ENTRIES
1222
1223
)
1223
1224
1224
1225
ktLocalFunction(
You can’t perform that action at this time.
0 commit comments