maddi-java-openjdk: type-use annotations on an anonymous class creation's type are dropped
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 1 h 58 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CodeLaser/maddi
-
build/ci good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
C# printer: an inner class of a generic class needs the outer type's arguments (Outer<A>.Inner)Abiertofront-end:csharp
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
-
Java → C# translation: an idiomatic C# printer driven by the modification and nullability analysesAbiertoenhancement extension front-end:csharp
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
-
enhancement extension front-end:csharp
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
Todos los issues de CodeLaser/maddi
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/rocketmq-dashboard#6896 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenIntegrationEngine/engine#496 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SasanLabs/VulnerableApp#836 ·
Los mantenedores suelen responder en 1 día