Commit 6e6306cf authored by Callie LeFave's avatar Callie LeFave

Allow `NULL` as an exception value when return value is a pointer to a fused type

parent 8ff9c50d
......@@ -850,6 +850,9 @@ class ExprNode(Node):
if src_type.is_fused:
error(self.pos, "Type is not specialized")
elif src_type.is_null_ptr and dst_type.is_ptr:
# NULL can be implicitly cast to any pointer type
return self
else:
error(self.pos, "Cannot coerce to a type that is not specialized")
......
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