swiftlang / swiftlang/swift-java

wrap-java: malformed where clause for static methods on nested types of generic interfaces

Open
#783 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

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.