Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SET-WORD! not gathered if in GROUP! inside PATH! in FUNCTION #2276

Open
hostilefork opened this issue Oct 24, 2017 · 2 comments
Open

SET-WORD! not gathered if in GROUP! inside PATH! in FUNCTION #2276

hostilefork opened this issue Oct 24, 2017 · 2 comments

Comments

@hostilefork
Copy link
Member

hostilefork commented Oct 24, 2017

>> z: "will this be overwritten"
== "will this be overwritten"

>> foo: function [x] [
    obj: make object! [y: 10]
    obj/(z: "yep" 'y): x
]

>> foo 100
== 100

>> z
== "yep"

The enumeration in COLLECT-WORDS/DEEP only considers BLOCK! and GROUP! values when descending, but GROUP!s or BLOCK!s in ANY-PATH! are not considered.

@hostilefork
Copy link
Member Author

hostilefork commented Jun 4, 2019

Ren-C has gone ahead and made it collect inside of paths...though the concept of using SET-WORD! as the cue for auto-collection is considered suspect at this point:

https://forum.rebol.info/t/rethinking-auto-gathered-set-word-locals/1150

So not calling it "resolved" just yet...

@hostilefork
Copy link
Member Author

hostilefork commented Sep 25, 2020

This is a bit more uncertain with new rules on PATH!, and stepping away from locals-gathering FUNC. :-/

For now, paths are skipped...as it would involve some special handling to deal with them, as they are different (not necessarily array-like, could be compressed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant