You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ilya Sher edited this page Jan 11, 2024
·
1 revision
This page describes rough edges in NGS which the user should be aware of.
Missing "global" in a namespace
ns {
type T
F each(t:T, cb:Fun) ...
[1,2,3].each(echo)
}
[1,2,3].each(echo) will fail with MethodNotFound exception. Unfortunately it's not easy to understand what's going on. The issue is that each is now local to ns. The code above should actually be:
ns {
type T
global each
F each(t:T, cb:Fun) ...
[1,2,3].each(echo)
}
A hint to understanding the situation should be MethodNotFound exception with something like: