Community
Participate
Working Groups
We should validate that all dispatch methods with primitive arguments use the same primitive type at a given index.
An alternative would be to compile this case to a reference-type argument in the dispatcher method, i.e. Number if only number primitives are used and Object otherwise. With auto-boxing and unboxing this should lead to the expected behavior. What do you think?
My gut feeling is that mismatches of primitive types in dispatch signatures are almost always a mistake. Catching that by means of boxing doesn't sound appealing to me.
Ok, then let's produce warnings for the proposed validation and fix the compiler so it generates correct dispatcher code.
New Gerrit change created: https://git.eclipse.org/r/43312
https://github.com/eclipse/xtext/pull/15
Requested via bug 522520. -M.