Kotlin printer: comments inside method bodies are not printed
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start in KotlinStatementPrinter, which never reads a statement's comments(), and in KotlinComments, which already turns file, type and member comments into KDoc. Read KotlinApply to see how it refuses to fold commented statements. Done means a comment inside a method body appears in the Kotlin output, with a stated rule for statements that are merged, split or hoisted. Decide those rules with the maintainers before coding.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Since d452873f5 the Java→Kotlin printer carries the comments of the file (licence header), types, fields, methods, constructors, enum entries and header properties, with Javadoc turned into KDoc (KotlinComments). Comments inside method bodies are still dropped: KotlinStatementPrinter never reads a statement's comments().
What makes this more than a one-liner: the printer does not map statements one to one. It merges and splits them (T().apply { … }, val copies for smart casts, hoisted locals, init blocks built from a constructor body), so a statement's comment needs a rule for where it goes when its statement is folded into another or disappears. KotlinApply already refuses to fold a statement that carries comments, which is one of these rules; the others need deciding.
Seen in the IDE's Java→Kotlin translation preview.
🤖 Generated with Claude Code
- Lenguaje dominante
- Java
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 1 h 13 min
- PR fusionados (30 d)
- 6
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
-
Javadoc warnings are the only noise on an otherwise clean CI runPosiblemente ocupada @jayeshamundkar06-bit la tomó hace 4 días. Abiertobuild/ci good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CodeLaser/maddi#4 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
front-end:csharp
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 61/100
CodeLaser/maddi#185 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 14/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
Todos los issues de CodeLaser/maddi
Issues similares
-
Keyboard crashes Chrome tabsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Julow/Unexpected-Keyboard#1490 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Vakore/ZappierGames#275 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
unitycatalog/unitycatalog#2148 ·
Los mantenedores suelen responder en 2 días
-
enhancement priority: low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Riptide-Labs/riptide#1060 ·
Los mantenedores suelen responder en 1 día
-
bug key bindings source editor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día