Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365910

Summary: [xtend] Validate dispatch methods with different primitive args
Product: [Tools] Xtend Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: CoreAssignee: Miro Spönemann <miro.spoenemann>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: miro.spoenemann, moritz.eysholdt
Version: 2.2.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
See Also: https://git.eclipse.org/r/43312
Whiteboard: v2.9

Description Sebastian Zarnekow CLA 2011-12-07 10:17:04 EST
We should validate that all dispatch methods with primitive arguments use the same primitive type at a given index.
Comment 1 Miro Spönemann CLA 2015-03-05 10:18:41 EST
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?
Comment 2 Sebastian Zarnekow CLA 2015-03-05 10:41:33 EST
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.
Comment 3 Miro Spönemann CLA 2015-03-05 11:22:41 EST
Ok, then let's produce warnings for the proposed validation and fix the compiler so it generates correct dispatcher code.
Comment 4 Eclipse Genie CLA 2015-03-06 09:35:54 EST
New Gerrit change created: https://git.eclipse.org/r/43312
Comment 5 Miro Spönemann CLA 2015-03-12 09:27:08 EDT
https://github.com/eclipse/xtext/pull/15
Comment 6 Eclipse Webmaster CLA 2017-10-31 10:48:33 EDT
Requested via bug 522520.

-M.
Comment 7 Eclipse Webmaster CLA 2017-10-31 10:59:36 EDT
Requested via bug 522520.

-M.