[Regression] get path evaluates it's argument
Describe the bug
>> about
Red 0.6.4 for Windows built 13-Jun-2021/10:10:47+03:00 commit #79ded2f
>> c: context [f: does [print 123]] get 'c/f
== func [][print 123]
>> about
Red 0.6.4 for Windows built 4-Jul-2021/2:04:09+03:00 commit #1e4fb1b
>> c: context [f: does [print 123]] get 'c/f
123
Expected behavior
No evaluation.
get/any works as expected.
>> c: context [f: does [print 123]] get/any 'c/f
== func [][print 123]
In the interpreter, the get value will be evaluated if no /any refinement. https://github.com/red/red/blob/master/runtime/interpreter.reds#L733
get/any shouldn't even exist IMO ;)
Good note @qtxie but /any is there only for unset! handling, isn't it?
@greggirwin According to the documents, yes. I pointed it out as I don't see a code branch to handle this case. The get? parameter in interpreter/eval-path should be used for it, but it's set by the /any refinement now. @dockimbel Do we need to add another any? parameter for the function?
Result of ? system/console/do-command is fun
>> o: object [x: 1 unset 'x]
== make object! [
x: unset
]
>> ? o/x
*** Script Error: value needs a value
*** Where: set
*** Near : ? o/x
*** Stack: ? help-string