| Summary: | [xtend2] Undetected syntax problem in switch statement | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Karsten Thoms <karsten.thoms> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sven.efftinge |
| Version: | 2.0.0 | Flags: | sven.efftinge:
indigo+
|
| Target Milestone: | M7 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| 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 function results to no validation error in an xtend file: String test (Object o) { switch (o) { Entity : o.packageName + "." + o.name DataType : switch (o.name) { Entity : "foo" : "bar" } } } The compiled Java code from this function has an compile error: "Incompatible conditional operand types String and Entity" if (!matched_1) { if (__valOfSwitchOver instanceof Entity) { // ERROR matched_1=true; switchResult_1 = "foo"; } }