Report malformed Object::Pad BUILD declarations clearly
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
BUILDin 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
BUILDdeclarations. - Keep valid Object::Pad
BUILDblocks and their constructor behavior unchanged.
Related: #1450, PR #1804.
- 主要言語
- Perl
- スター
- 64
- フォーク
- 7
- 平均マージ
- 5時間 31分
- マージ済み PR(30日)
- 214
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fglock/PerlOnJava のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#1579 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
fglock/PerlOnJava#1835 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
fglock/PerlOnJava#1820 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port area:runtime bug
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
fglock/PerlOnJava#1802 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area:backend area:cpan-port area:runtime bug
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
fglock/PerlOnJava#1801 ·
メンテナーはふだん 1 日以内に返信
fglock/PerlOnJava の issue をすべて見る
似ている issue
-
Add .gitattributes so share/skel keeps LF on a Windows git checkout対応中かも @sadhana-s-codez が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
PerlDancer/Dancer2#1854 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
major/MySQLTuner-perl#1007 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
bioconda/bioconda-recipes#70187 ·
メンテナーはふだん 2 日以内に返信