| Summary: | Int can be a bool expression? | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | fahua jin <jinfahua> |
| Component: | EDT | Assignee: | Project Inbox <edt.compiler-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | pfyu, pharmon, svihovec |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
The error message for the generated Java program. Description Resource Path Location Type Cannot cast from int to boolean Test2.java /org.eclipse.edt.egl.mvc.test/generatedJava/server line 39 Java Problem I have updated the following validators to prevent this: CaseStatementValidator IfStatementValidator WhileStatementValidator Paul, Is there a .egl file in our system types that would indicate the lack of support for this conversion? You can look at EBoolean.egl (which does not contain any conversion operations), and EInt.egl, which does not contain any conversion operation that takes an EBoolean. Verified in 0.7.0.v201111060901. (In reply to comment #5) > Verified in 0.7.0.v201111060901. Wrong version submit, it should be 0.7.0.v201111071403 |
Build Identifier: 0.7.0.v201111060901 I have following statements in the EGL program, the returned type of function daysDifferent is int. But our EGL compiler does not prompt any error information. If generate the code to Java, then the Java program has error compilation message; If generate the code to JavaScript, then it prints true. amon date = "01/01/2011"; curDate date; if(amon.daysDifferent(curDate)) syslib.writeStdout("true"); else syslib.writeStdout("false"); end Reproducible: Always