Skip to content

Commit

Permalink
Enforce priority to be non-negative
Browse files Browse the repository at this point in the history
  • Loading branch information
tothtamas28 committed Jan 17, 2025
1 parent 901b3bf commit 1ffb465
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyk/src/pyk/k2lean4/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ def __init__(
ident: str | DeclId | None = None,
modifiers: Modifiers | None = None,
):
if priority and priority < 0:
raise ValueError('Priority must be non-negative')
if not signature.ty:
# TODO refine type to avoid this check
raise ValueError('Missing type from signature')
Expand Down

0 comments on commit 1ffb465

Please sign in to comment.