Inferred void class operations are never checked against the starter's return type

オープン
#871 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@papaya0112 がすでに取り組んでいます。

2026年11月26日 から。

評価

この issue はまだ評価されていません。

説明

posed in scripts/problem_bank/rules.py publishes each class operation's kind in methodReturnTypes from the cases alone: an operation is "void" when every expected value for it is null. The C++ and Java harnesses already drop whatever a "void" operation returns, and #849 makes the JavaScript and Python runners do the same. A value-returning operation whose cases all happen to expect null would therefore be published as void and stop being compared in all four languages, so any return would pass.

Nothing checks the inference today. The test #849 adds only holds each kind to the spelling "void" or "value" and to the operations the cases call; it cannot tell a wrong kind from a right one, because the expected values it builds read the same field the runners do. The starters already state the real type, for example void push(int value) and int top() in the C++ starter of Tentative Bid Ledger.

Comparing each inferred kind with the return type the C++ starter declares, next to the inference in rules.py or as a check in tests/test_gen_problems.py, would fail when such a judge is generated. All eight served class judges agree with their starters today, so the check refuses nothing now. This was raised in the review of #849 and left out of that change.

主要言語
Rust
スター
236
フォーク
153
平均マージ
1日 9時間
マージ済み PR(30日)
187

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sysprog21/codetrial のほかの issue

sysprog21/codetrial の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。