-
The normal rules on scoping seem to imply that if B requires A and C requires B, but not A, then C will see B's definitions but not A's. Experiement suggests that C will see the names of scattered definitions introduced in A - and it can add to those definitions. So if A has something like
B has
C has
Sail will accept this, and references to So it seems that scatter-defined names (is that the right terminology?) propagate through all imports, even indirect ones, in a way that normally defined names don't. I looked through the documentation but couldn't see this mentioned anywhere. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Should be fixed by #406 Currently the module system is WIP, so there are probably some similar issues. The in-scope check is done when accessing items from a typing context, so I probably need to go through and check all functions that are modifying things in the typing context to ensure they are not doing this in a way that breaks the rules. |
Beta Was this translation helpful? Give feedback.
Should be fixed by #406
Currently the module system is WIP, so there are probably some similar issues. The in-scope check is done when accessing items from a typing context, so I probably need to go through and check all functions that are modifying things in the typing context to ensure they are not doing this in a way that breaks the rules.