That particular error has always been confusing. The primary helpful
information is precisely what @sls1005 and @Hlaaftana suggested. You need to
know the proc, the type, and ideally, the context you used it in. All the other
overloads are useless unless you meant to use a different type, which is
probably not very often (at least for me). I also think it might be a bit
unreasonable for the compiler to reason about where the import might come from,
given that it probably doesn't have this information. I think the better thing
would be for the compiler to be more intelligent and include
procs/methods/funcs attached to the type, even if you've imported it "second
hand" from another module like @Zekereth did.
So given that, the most helpful error message might be something like what you
guys suggested, but with some context, like so (similar to Rust):
Error: 'len(Table[string, string])' is not defined in this scope.
4 |
5 | assert(collection.getAll().len == 2)
6 | ^^^
Run
But not sure how feasible that is given the current structure of the error
message reporting.