test(verilog): terminate the r_ca_2 fixture's call statement - #2400
Merged
Conversation
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-08-22 10:48:03 UTC
Summary
Seal Status
|
This was referenced Aug 22, 2026
gHashTag
enabled auto-merge (squash)
August 22, 2026 10:58
The fixture failed to parse, so the test never reached its rule. The cause is not the array literal its name blames: consume(7) followed by return fails identically, and the same call with a ; or as the final statement parses. The condition is an expression statement without a terminator followed by another statement. With the terminator both tests pass and measure what they name -- the emitter writes a real argument plus a comment, not a comment standing in for one. Array literals in call position remain unlowered; R-CA-2 is the narrower rule. Closes #2399
gHashTag
force-pushed
the
fix/2399-rca2-terminator
branch
from
August 22, 2026 11:04
8ad9eb9 to
bd967bd
Compare
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-08-22 11:04:38 UTC
Summary
Seal Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2399
What
r_ca_2_synthetic_no_comment_only_call_argumentnever reaches its subject. Its fixturefails to parse:
The test's name is wrong about the cause
Isolated with four probes:
consume([1,2,3,4])thenreturnconsume([1,2,3,4]);thenreturnconsume(7)thenreturnconsume([1,2,3,4])as last statementThe array literal is irrelevant. The condition is an expression statement without a
terminating
;, followed by another statement. The fixture omits the semicolon.Fix
One character. With
consume([1, 2, 3, 4]);both tests in the file pass, and the testfinally measures what it names: the emitter writes
consume(0 /* TODO: array literal [1,2,3,4] not yet lowered to Verilog */)— a real argument plus a comment, not acomment standing in for one.
Note what this does not fix. Array literals in call position are genuinely not
lowered; the emitter says so in its own output and emits
0. R-CA-2 is the narrower rulethat the argument must not be comment-only, and that rule holds.
Related measurement, offered as context and not as a claim of breakage
Sweeping
t27c parseover all 650.t27files underspecs/: 496 parse, 154 do not.The 496 matches the repository's own recorded baseline, so this is the known state, not a
regression.
The single largest failure kind is the same mechanism as above — 28 of the 154 report
unexpected token after expression statement. For examplespecs/server/session.t27:187:Whether the parser should accept newline-terminated expression statements is a language
decision, not a defect I am asserting. 717 spec files use
;line endings, so thesemicolon form is clearly the norm; the question is only whether the other form should be
rejected. Raising it rather than answering it.
I also nearly reported a much larger and much wronger number:
t27c gen-verilogfails on649 of 650, because most specs are not hardware specs and that backend legitimately
declines them.
t27c corpus's own help text warns about exactly this class of measurement— "a parser error count moves three orders of magnitude from one character and RISES when
a real defect is fixed (T119)".
Why it stayed red
Target 65 of 73;
cargo test -p t27c --testsstops at the first failing target (#2382).This is 1 of the 7 in #2386, leaving 1.
Related: #2386, #2382.