Skip to content
Snippets Groups Projects
Commit b6245a95 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Obey constants_only restrictions on min/max/static value even for single-piece PwAffs.

parent 0520aa8d
No related branches found
No related tags found
No related merge requests found
...@@ -168,7 +168,11 @@ def iname_rel_aff(space, iname, rel, aff): ...@@ -168,7 +168,11 @@ def iname_rel_aff(space, iname, rel, aff):
def static_extremum_of_pw_aff(pw_aff, constants_only, set_method, what, context): def static_extremum_of_pw_aff(pw_aff, constants_only, set_method, what, context):
pieces = pw_aff.get_pieces() pieces = pw_aff.get_pieces()
if len(pieces) == 1: if len(pieces) == 1:
return pieces[0][1] (_, result), = pieces
if constants_only and not result.is_cst():
raise ValueError("a numeric %s was not found for PwAff '%s'"
% (what, pw_aff))
return result
# put constant bounds first # put constant bounds first
pieces = ( pieces = (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment