Commit f376a8bf authored by Robert Bradshaw's avatar Robert Bradshaw

Const cast fix.

parent 050d7345
......@@ -301,8 +301,10 @@ def p_typecast(s):
s.next()
base_type = p_c_base_type(s)
is_memslice = isinstance(base_type, Nodes.MemoryViewSliceTypeNode)
is_template =isinstance(base_type, Nodes.TemplatedTypeNode)
if not is_memslice and not is_template and base_type.name is None:
is_template = isinstance(base_type, Nodes.TemplatedTypeNode)
is_const = isinstance(base_type, Nodes.CConstTypeNode)
if (not is_memslice and not is_template and not is_const
and base_type.name is None):
s.error("Unknown type")
declarator = p_c_declarator(s, empty = 1)
if s.sy == '?':
......
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