Commit 108982d7 authored by Stefan Behnel's avatar Stefan Behnel

extend compile time constants error test case

parent 93c73c15
......@@ -711,8 +711,8 @@ def wrap_compile_time_constant(pos, value):
else:
# error already reported
return None
error(pos, "Invalid type for compile-time constant: %s"
% value.__class__.__name__)
error(pos, "Invalid type for compile-time constant: %r (type %s)"
% (value, value.__class__.__name__))
return None
......
# mode: error
DEF t = (1,2,3)
DEF t_const = (1,t,2)
DEF t_non_const = (1,[1,2,3],3,t[4])
x = t_non_const
_ERRORS = u"""
5:32: Error in compile-time expression: IndexError: tuple index out of range
7:15: Invalid type for compile-time constant: None (type NoneType)
7:15: Invalid type for compile-time constant: [1, 2, 3] (type list)
"""
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