Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Report malformed Object::Pad BUILD declarations clearly

Abierto
#1,808 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, perl
Área
compilers

Línea de trabajo

Start with the class-block parser in the Perl front end, where BUILD is recognized and where a missing block body falls through into expression parsing. Reproduce with class BadBuild { BUILD method value {} } under use Object::Pad; and confirm the current unblessed-reference error. Done when that input yields a targeted syntax diagnostic, out-of-class BUILD gets coverage, and valid BUILD blocks still pass the existing Object::Pad tests.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Context

PR #1804 added support for valid Object::Pad BUILD { ... } blocks, including execution after field initialization, and passed the CAD::OpenSCAD 0.14 acceptance tests on both JVM and interpreter backends. The original parser failure is fixed.

Remaining diagnostic gap

Malformed or misplaced BUILD syntax should receive a focused compile-time diagnostic. Today, an incomplete class block can fall through into ordinary expression parsing and fail later with a confusing runtime error.

For example, against the merged implementation:

use Object::Pad;
class BadBuild { BUILD method value {} }

currently reports Can't call method "value" on unblessed reference instead of identifying the malformed BUILD declaration.

Follow-up

  • Detect BUILD in a class block when it is not followed by a block body and report a targeted syntax diagnostic.
  • Add project-owned coverage for malformed and out-of-class BUILD declarations.
  • Keep valid Object::Pad BUILD blocks and their constructor behavior unchanged.

Related: #1450, PR #1804.

Lenguaje dominante
Perl
Estrellas
64
Forks
7
Merge medio
5 h 25 min
PR fusionados (30 d)
213

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fglock/PerlOnJava

Todos los issues de fglock/PerlOnJava

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.