| Summary: | [xbase] [validation] too strict "incompatible types" check | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Knut Wannheden <knut.wannheden> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | 2.0.0 | Flags: | sebastian.zarnekow:
indigo+
|
| Target Milestone: | M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Pushed to master. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
The following Xtend2 snippet: <T extends Integer> requiresCastOfOperand() { [T a,T b|a+b] } results in a validation error for the right 'b' operand of the '+' expression: "Incompatible types. Expected java.lang.Number but was T". Changing the snippet to read: <T extends Integer> requiresCastOfOperand() { [T a,T b|a+(b as Integer)] } gets rid of the validation. But that shouldn't be necessary.