maddi-java-openjdk: type-use annotations on an anonymous class creation's type are dropped
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by tracing how the OpenJDK front end builds the anonymous class’s parent ParameterizedType and the ConstructorCall type, then compare that path with the named class supertype clause that preserves annotations. The issue names no files or tests, so first locate those entry points and a focused front end test. Done when the anonymous class parent type retains @Nullable and the Kotlin output keeps the annotation consistently with the next() return type.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The OpenJDK front end keeps no type-use annotations on the type of an anonymous class creation. guava's Iterators.partitionImpl:
return new UnmodifiableIterator<List<@Nullable T>>() {
@Override
public List<@Nullable T> next() { ... }
};
arrives as UnmodifiableIterator<List<T>>. Neither the anonymous class's parent type nor the ConstructorCall's type carries the @Nullable. The same annotation on a named class's supertype clause is kept; the J2K printer prints that one as T? since 367ca79bc.
Effect: the Kotlin translation prints the anonymous class header as UnmodifiableIterator<MutableList<T>>, while its next(): MutableList<T?> keeps the annotation. kotlinc then reports "return type of 'fun next(): MutableList<T?>' is not a subtype of the return type of the overridden member" (guava Iterators.kt:387, Iterables.kt:177, and Iterators.kt:376/397 downstream).
Expected: the parent ParameterizedType of the anonymous TypeInfo, or the ConstructorCall's parameterizedType(), carries the type-use annotations as written, as for a named class's extends/implements clause.
Found while reducing guava's KotlinConf scoreboard compile errors, together with the printer session.
🤖 Generated with Claude Code
- Lingua principale
- Java
- Stelle
- 1
- Fork
- 1
- Merge medio
- 1h 58m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CodeLaser/maddi
-
build/ci good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug front-end:javac
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
CodeLaser/maddi#145 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
C# printer: an inner class of a generic class needs the outer type's arguments (Outer<A>.Inner)Apertafront-end:csharp
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
CodeLaser/maddi#140 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Java → C# translation: an idiomatic C# printer driven by the modification and nullability analysesApertaenhancement extension front-end:csharp
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di CodeLaser/maddi
Issue simili
-
pdfium-drift
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
Stirling-Tools/JPDFium#176 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
hiero-ledger/hiero-consensus-node#27712 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
Vakore/ZappierGames#162 ·
-
Improve README documentation clarity and fix minor wording issuesForse già presa @simplesilence l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
resilience4j/resilience4j#2567 ·
I maintainer di solito rispondono entro 6 giorni
-
Priority/High
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
wso2/dpdp-accelerator#417 ·
I maintainer di solito rispondono entro 1 giorno