|
|
@ -554,7 +554,7 @@ class FunctionVyper: # pylint: disable=too-many-instance-attributes |
|
|
|
def _parse_returns(self, returns: Union[Name, TupleVyper, Subscript]): |
|
|
|
def _parse_returns(self, returns: Union[Name, TupleVyper, Subscript]): |
|
|
|
|
|
|
|
|
|
|
|
self._function.returns_src().set_offset(returns.src, self._function.compilation_unit) |
|
|
|
self._function.returns_src().set_offset(returns.src, self._function.compilation_unit) |
|
|
|
# Only the type of the arg is given, not a name. We create an an `Arg` with an empty name |
|
|
|
# Only the type of the arg is given, not a name. We create an `Arg` with an empty name |
|
|
|
# so that the function has the correct return type in its signature but doesn't clash with |
|
|
|
# so that the function has the correct return type in its signature but doesn't clash with |
|
|
|
# other identifiers during name resolution (`find_variable`). |
|
|
|
# other identifiers during name resolution (`find_variable`). |
|
|
|
if isinstance(returns, (Name, Subscript)): |
|
|
|
if isinstance(returns, (Name, Subscript)): |
|
|
|