Commit 1fbc394d authored by Hrvoje Ribicic's avatar Hrvoje Ribicic

Relax the tuple parsing restrictions

The strict check if a tuple is indeed a tuple in the result validation
system is too strict for the current assumptions in the system. This
patch permits lists to be used when tuples are expected, provided they
still satisfy the type constraints.
Signed-off-by: default avatarHrvoje Ribicic <riba@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 8f41eacf
......@@ -433,7 +433,8 @@ def TTupleOf(*val_types):
"""
desc = WithDesc("Tuple of %s" % (Parens(val_types), ))
return desc(TAnd(TTuple, TIsLength(len(val_types)), TItems(val_types)))
return desc(TAnd(TOr(TTuple, TList), TIsLength(len(val_types)),
TItems(val_types)))
def TSetOf(val_type):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment