mirth-lang/mirth

"Name unknown" error should be distinguished from "name not visible" and "wrong number of arguments".

typeswitch-dev opened this issue · 0 comments

When using a name that's not found in any imported namespace, the compiler gives off a "name unknown" error. However a couple of specific cases should be distinguished, to improve the error message:

  • if the name exists in a namespace that's not visible, the compiler should say "name not visible" instead, and tell you all the qualified names that match, so you can figure out if you need to import a module or fix your types.

  • if there is a visible word with the same name, but a different arity, the compiler should say "wrong number of arguments" instead, and show you the versions of the word that are available (with arguments visible)