swiftlang / swiftlang/swift-java
wrap-java: malformed where clause for static methods on nested types of generic interfaces
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 1.2k
- Forks
- 123
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 16
Description
When wrap-java translates a static method whose declaring type is a nested type of a generic interface (e.g. java.util.Map.Entry.copyOf, or any static returning Map.Entry<K, V> from Map), the emitted where ObjectType == … clause omits the outer type's generic arguments. The result fails to compile.
This affects generating java.util.Map
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 at the wrap-java translation path for static methods declared on nested types of generic interfaces, using java.util.Map.Entry.copyOf and methods returning Map.Entry<K, V> as examples. Inspect the emitted where ObjectType == … clause and verify that generated output for java.util.Map compiles with the outer generic arguments preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, swift
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100