> On 18 May 2018, at 10:39, Marcus Denker <[email protected]> wrote:
>
> Hi,
>
> the #binding: API until now did not allow to shadow globals. But there is
> actually no reason to forbid that
> (and it can actually be interesting, e.g. to compile code where one class ref
> is switched to another).
>
> The Pull Request does:
>
> - add comment to OCExtraBindingScope
> - categorize tests
> - change #lookupVar: to allow shadowing of Globals.
> - change test to reflect the new behaviour
>
> This means you can do:
>
> result := Smalltalk compiler
> bindings: {(#Object -> Point)} asDictionary;
> evaluate: 'Object new'.
>
> https://github.com/pharo-project/pharo/pull/1379
>
A second iteration now makes it work correctly for assignments:
https://github.com/pharo-project/pharo/pull/1397
Smalltalk compiler
bindings: {(#test -> Point)} asDictionary;
evaluate: 'test := 42'.
Marcus