jaunt-lang / jaunt

[ABANDONED] A jaunt away from Clojure
https://github.com/jaunt-lang/jaunt/issues/157
134 stars 6 forks source link

Provide call site arity warnings #128

Open arrdem opened 8 years ago

arrdem commented 8 years ago

Using #127, when emitting an InvokeExpr(VarExpr &args), and the VarExpr is a bound Var having a Fn value attempt to verify that the FnMethod to be invoked is in fact implemented in the callee, and provide a line/column warning if the call site cannot be statically validated.

arrdem commented 8 years ago

Interestingly the compiler already does a crude pattern match against Var arglists in order to check for a invokePrimitive opportunity. Adding a warning that no matching arlist was found there should be pretty easy, although arglist information should move off Vars onto Fns.