Skip to content

Commit 1ffb465

Browse files
committed
Enforce priority to be non-negative
1 parent 901b3bf commit 1ffb465

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyk/src/pyk/k2lean4/model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ def __init__(
136136
ident: str | DeclId | None = None,
137137
modifiers: Modifiers | None = None,
138138
):
139+
if priority and priority < 0:
140+
raise ValueError('Priority must be non-negative')
139141
if not signature.ty:
140142
# TODO refine type to avoid this check
141143
raise ValueError('Missing type from signature')

0 commit comments

Comments
 (0)