Commit 39b28f29 authored by Sergio Costas's avatar Sergio Costas

Now checks correctly when the return variable is, or not, borrowed

parent 244c1acd
......@@ -967,7 +967,7 @@ class crust(crust_helpers):
if thread["node"] is None:
return_is_borrowed = False
else:
return_is_borrowed = thread["node"].t_crust_borrow
return_is_borrowed = var_data["borrowed"]
if tmp_status["return_is_borrowed"] and (not return_is_borrowed):
self._add_error(tmp_status, self.MSG_ERROR, "Function '{:s}' expects a borrowed value to return, but a non-borrowed was used at line {:d}", tmp_status["current_function"], node.line)
if (not tmp_status["return_is_borrowed"]) and return_is_borrowed:
......
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