Andrew Fedoniouk (2013-07-10T23:55:37.000Z)
On Wed, Jul 10, 2013 at 4:40 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> On Wed, Jul 10, 2013 at 7:24 PM, Rick Waldron <waldron.rick at gmail.com> wrote:
>>
>> It gets created nowhere,
>
> This is right.
>
>> because the body of a module is implicitly strict,
>
> And this is right.
>
>> so the above code produces a Reference Error.
>
> But this is incorrect, because modules check that their bodies don't
> have free variables, so the above code has a _static_ error.
>
> Sam

Sam, I don't think that generation of static check/error is possible
in this case.
{{globalns}}.gvar can be created after the module gets loaded/compiled
but before
Test.setVar() invocation.


--
Andrew Fedoniouk.

http://terrainformatica.com
domenic at domenicdenicola.com (2013-07-13T01:07:51.383Z)
On Wed, Jul 10, 2013 at 4:40 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> But this is incorrect, because modules check that their bodies don't
> have free variables, so the above code has a _static_ error.

Sam, I don't think that generation of static check/error is possible in this case.
`{{globalns}}.gvar` can be created after the module gets loaded/compiled
but before `Test.setVar()` invocation.