Skip to content

Commit

Permalink
Use Ada-like syntax for case ranges
Browse files Browse the repository at this point in the history
Ref. #907
  • Loading branch information
senier committed Jul 12, 2022
1 parent 3e7568b commit a4fc8ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rflx/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,7 @@ def _check_integer(self) -> RecordFluxError:
),
*[
(
f"missing range {r[0]}-{r[1]}"
f"missing range {r[0]} .. {r[1]}"
if r[0] != r[1]
else f"missing value {r[0]}",
Subsystem.MODEL,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/expression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,7 @@ def test_case_invalid() -> None:
location=Location((2, 2)),
),
'^<stdin>:2:2: model: error: case expression does not cover full range of "P::Tiny"\n'
"<stdin>:1:2: model: info: missing range 2-3$",
"<stdin>:1:2: model: info: missing range 2 .. 3$",
)
assert_type_error(
CaseExpr(
Expand Down

0 comments on commit a4fc8ca

Please sign in to comment.