Commit 2b8bff70 authored by Robert Bradshaw's avatar Robert Bradshaw

#579 - compiler crash on invalid buffer type

parent 5bc3a71e
......@@ -37,7 +37,10 @@ def interpret_compiletime_options(optlist, optdict, type_env=None, type_args=())
def interpret(node, ix):
if ix in type_args:
if type_env:
return (node.analyse_as_type(type_env), node.pos)
type = node.analyse_as_type(type_env)
if not type:
raise CompileError(node.pos, "Invalid type.")
return (type, node.pos)
else:
raise CompileError(node.pos, "Type not allowed here.")
else:
......
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