| Summary: | [xtend] Validate dispatch methods with different primitive args | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Sebastian Zarnekow <sebastian.zarnekow> |
| Component: | Core | Assignee: | 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
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 Requested via bug 522520. -M. Requested via bug 522520. -M. |