An external spec cannot refine methods its class inherits
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- java
- 領域
- compilers, testing-qa
調査の方向性
Start by reading the external-refinement method lookup that emits “Could not find method” for pack() and setUndecorated(boolean); the issue does not name its source files or tests. Reproduce the example against the reported main revision, then trace how lookup handles methods inherited from java.awt.Window and java.awt.Frame. Done when an external spec can name those inherited methods and the protocol example is verified as intended.
索引モデルが issue の本文から書いたものです。
説明
@StateSet({"displayable", "notDisplayable"})
@ExternalRefinementsFor("javax.swing.JFrame")
public interface JFrameRefinementsExpert {
@StateRefinement(to = "notDisplayable(this)") void JFrame(String title);
@StateRefinement(to = "displayable(this)") void pack();
@StateRefinement(from = "notDisplayable(this)") void setUndecorated(boolean undecorated);
}
public class Repro {
void show() {
JFrame f = new JFrame("x");
f.pack();
f.setUndecorated(true); // throws IllegalComponentStateException: The frame is displayable.
}
}
On main 321a7321:
Warning: Could not find method 'void pack()' for 'javax.swing.JFrame'
Warning: Could not find method 'void setUndecorated(boolean)' for 'javax.swing.JFrame'
Correct! Passed Verification.
pack is declared in java.awt.Window and setUndecorated in java.awt.Frame; a spec can only name methods its own class declares. A protocol that spans a hierarchy (here: displayable, from Window, guarding a Frame method) then has to be split into one interface per declaring class, sharing states by simple name (which also depends on registration order, see the related issue). Expected: an external spec can name inherited methods, applying to calls on receivers of that class.
- 主要言語
- Java
- スター
- 67
- フォーク
- 36
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
liquid-java/liquidjava のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
liquid-java/liquidjava#388 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
liquid-java/liquidjava#373 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
liquid-java/liquidjava#321 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
liquid-java/liquidjava#390 ·
メンテナーはふだん 1 日以内に返信
-
Verifier crashes on `!` (or another unary operator) applied to a call whose type cannot be resolvedオープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
liquid-java/liquidjava#389 ·
メンテナーはふだん 1 日以内に返信
liquid-java/liquidjava の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
floci-io/floci#5425 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
objectionary/eo-graphs#80 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
objectionary/jucs#141 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
repowise-dev/repowise#3335 ·
メンテナーはふだん 1 日以内に返信