How to get the return type kawa would infer for an expression?
Hello. I'm a beginner trying to make an emacs library called "geiser" to work with kawa and having access to the kawa's type inference could be useful for java completion and method arglist.
Is there a simple way to get the return type the compiler would infer for an expression? In the end I would like to obtain something like `(which-return-type-would-you-tell-for-this '(....))`.
I read in a past thread in the mailing list archive that the kind of type inference the kawa compiler does is based on "optimistic", not static type checking, but I think that's ok if the user is aware of it.
The reason I'm trying to avoid plain reflection on the sexp, like =(*:getMethods (*:getClass '(...)))=, is that the (...) form could have side effects the programmer may not want to trigger just to get completions.
While I was trying to find this by myself I wrote the following copy/pasting from kawa source code and noticed that after `(gnu.expr.ModuleExp:evalToClass comp #!null)`
type warnings appear in the sourceMessages, so the compiler has to know something about types at that point. Maybe the answer to my question is near there?