swiftlang / swiftlang/swift-java
wrap-java: add tests for enums, ensure inheritance is modeled ok
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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