swiftlang / swiftlang/swift-java

wrap-java: add tests for enums, ensure inheritance is modeled ok

Open
#436 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature:wrap-java
Dominant language
Swift
Stars
1.2k
Forks
123
Avg merge
1d 7h
Merged PRs (30d)
16

Description

We now support inheritance better and it sadly caused more trouble in existing paths: e.g. the JavaDependency example had a "org.apache.commons.io.IOCase" : "IOCase", which now has trouble importing.

Due to not importing java.lang.Enum we downgrade the inheritance to JavaObject; but the infra isn't smart enough yet to also drop the generic parameter which it DID prepare forr the enum Me /*extends Enum<Me>*/; this isn't real java code either, but reflection does give us this inheritance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the wrap-java handling for Java enums and inheritance, using the JavaDependency example and the reflected enum Me case described here. Add regression tests covering enum inheritance and imports, then verify generated modeling does not retain the invalid generic Enum<Me> parameter when falling back to JavaObject.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, swift
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.