| Summary: | [Xbase/Xtend] Illegal code generated/missing validations for ComparableExtensions grreater/lesser than operators | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Stephane Barbey <stephane> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | unspecified | Flags: | sebastian.zarnekow:
indigo+
|
| Target Milestone: | SR1 | ||
| 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 |
Build Identifier: I20110613-1736 The following code: package gub class Buggy { def buggy() { if ("3">3) if ("true"<false) return true>=0; } } should be illegal (?). It however generates non-compilable code: package gub; import org.eclipse.xtext.xbase.lib.ComparableExtensions; @SuppressWarnings("all") public class Buggy { public Boolean buggy() { Object _xifexpression = null; boolean _operator_greaterThan = ComparableExtensions.<Integer>operator_greaterThan("3", ((Integer)3)); if (_operator_greaterThan) { Object _xifexpression_1 = null; boolean _operator_lessThan = ComparableExtensions.<Boolean>operator_lessThan("true", ((Boolean)false)); if (_operator_lessThan) { boolean _operator_greaterEqualsThan = ComparableExtensions.<Integer>operator_greaterEqualsThan(((Boolean)true), ((Integer)0)); return _operator_greaterEqualsThan; } _xifexpression = _xifexpression_1; } return _xifexpression; } } Reproducible: Always