Skip to content

fix: Integer underflow in lexer error message formatting - #524

Merged
Anand Krishnamoorthi (anakrish) merged 1 commit into
microsoft:mainfrom
hkrutzer:fix-underflow
Dec 15, 2025
Merged

fix: Integer underflow in lexer error message formatting#524
Anand Krishnamoorthi (anakrish) merged 1 commit into
microsoft:mainfrom
hkrutzer:fix-underflow

Conversation

@hkrutzer

@hkrutzer hkrutzer commented Dec 13, 2025

Copy link
Copy Markdown

See #518

The example now produces:

Error adding policy:
--> example.rego:8:0
  |
8 | match("^hello", text)
  | ^
error: invalid whitespace between . and identifier
Input set successfully
Result: QueryResults {
    result: [],
}

fixes #518

@anakrish

Copy link
Copy Markdown
Collaborator

Hey hkrutzer, Thanks for the fix. Can you also add an interpreter test here to lock down the scenario:

@hkrutzer

Copy link
Copy Markdown
Author

Added!

@microsoft-github-policy-service agree

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix, hkrutzer.

@anakrish
Anand Krishnamoorthi (anakrish) merged commit 2a75b3b into microsoft:main Dec 15, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[potential bug] panics when there is a new line after dot

2 participants