Open Oldes opened 2 weeks ago
In Red:
>> context [ f4: func[return: [integer!]][ return 42 'oh-no! ] print f4 ] ()
42
Set-words collecting in object's body is done at root level only.
I should not include the context
example here as I already fixed this case as a part of this issue: https://github.com/Oldes/Rebol-issues/issues/2602.
But the case with function inside a function
and wrap
is still a problem.
Use of
return:
keyword in a function specification may be confusing when used with functions which automatically collects set-words... likefunction
,wrap
which usesbind/set
internally (reason why I noticed the issue) or evencontext
.Maybe it would be better to use some other type than a set-word.
Red has the same issue: https://github.com/red/red/issues/5554