Found while converting syntax_test/test_constant_immutability.wfl into the asserted diagnostics fixture tests/fixtures/diagnostics/constant_immutability.wfl (repository hygiene migration).
Each mutation form (change, add, subtract, multiply, divide) is correctly rejected with Cannot modify constant ... when it appears alone. But when several mutations of the same constant appear in sequence, the analyzer emits only 4 reports for 5 mutations — the add 10 to MAX_SIZE report is the one dropped (verified by removing each line in turn: removing the add line still yields 4 reports; removing any other line yields 3).
Repro (exit code 3, count the reports):
store new constant MAX_SIZE as 100
change MAX_SIZE to 200
add 10 to MAX_SIZE
subtract 5 from MAX_SIZE
multiply MAX_SIZE by 2
divide MAX_SIZE by 2
tests/diagnostics_fixtures_test.rs::constant_mutation_is_rejected_for_every_mutation_form currently pins >= 4 reports with a comment pointing here; tighten it to >= 5 when this is fixed.
Found while converting
syntax_test/test_constant_immutability.wflinto the asserted diagnostics fixturetests/fixtures/diagnostics/constant_immutability.wfl(repository hygiene migration).Each mutation form (
change,add,subtract,multiply,divide) is correctly rejected withCannot modify constant ...when it appears alone. But when several mutations of the same constant appear in sequence, the analyzer emits only 4 reports for 5 mutations — theadd 10 to MAX_SIZEreport is the one dropped (verified by removing each line in turn: removing theaddline still yields 4 reports; removing any other line yields 3).Repro (exit code 3, count the reports):
tests/diagnostics_fixtures_test.rs::constant_mutation_is_rejected_for_every_mutation_formcurrently pins>= 4reports with a comment pointing here; tighten it to>= 5when this is fixed.