Skip to content

fix: generate enum entries and constructors in JVM proxies - #28

Merged
kdroidFilter merged 1 commit into
mainfrom
fix/24-enum-entries-jvm-proxies
Aug 18, 2026
Merged

fix: generate enum entries and constructors in JVM proxies#28
kdroidFilter merged 1 commit into
mainfrom
fix/24-enum-entries-jvm-proxies

Conversation

@kdroidFilter

Copy link
Copy Markdown
Collaborator

Summary

  • Parse enum entries from PSI body children (and fall back to declarations) so jvmProxies always emit the actual constants
  • Reconstruct enum primary constructors (val code: Int, multi-param, string literals) instead of dropping them
  • Add plugin unit tests for parse + codegen, plus e2e EnumTest coverage (Color, Status, HttpStatus)

Fixes #24

Type

fix

Test plan

  • :plugin-build:nna:testPsiSourceParserEnumTest, FfmProxyGeneratorEnumTest
  • :examples:calculator:generateKneNativeBridgesOperation / Color / Status / HttpStatus proxies contain entries (and constructor values)
  • :examples:calculator:jvmTest --tests com.example.calculator.EnumTest — 14 tests, including native ordinal round-trip

Parse enum entries from PSI body children and reconstruct constructor
properties so jvmProxies can use Enum.entries without IndexOutOfBounds.

Fixes #24
@kdroidFilter
kdroidFilter merged commit e5091ae into main Aug 18, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Enums entries are not generated in jvmProxies

1 participant