| Summary: | false failures in grammar file derived from xbase | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Andreas Muelder <Andreas.Muelder> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mendapara.amit, sebastian.zarnekow |
| Version: | unspecified | Flags: | sebastian.zarnekow:
indigo+
|
| Target Milestone: | SR2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
I have exactly the same issue. Here is my derived grammar:
[code]
JvmFormalParameter returns types::JvmFormalParameter:
name=ValidID (':' parameterType=JvmTypeReference)?;
XForLoopExpression returns xbase::XForLoopExpression:
{xbase::XForLoopExpression}
'for' '(' declaredParam=JvmFormalParameter 'in' forExpression=XExpression ')'
eachExpression=XExpression;
[/code]
And the error is:
[code]
Cannot find compatible feature declaredParam in sealed EClass XForLoopExpression from imported package http://www.eclipse.org/xtext/xbase/Xbase. The existing reference 'declaredParam' has an incompatible type 'null'.
[/code]
This happens each time I build the project. Then I have to edit the xtext file and error disappears.
Should be fixed in latest version in the repo. Please reopen if the problem is still present. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
Build Identifier: 20110615-0604 When I create a new Grammar derived from Xbase, I get some false error markers. For Example: grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.xbase.Xbase import "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.ecore" XVariableDeclaration returns XExpression: {XVariableDeclaration} (writeable?='var' | 'const') (=> (type=JvmTypeReference name=ValidID) | name=ValidID) ('=' right=XExpression)?; I can generate this example without errors. But in the editor, I get the following problem marker attached to 'type=JvmTypeReference' 'Cannot find compatible feature type in sealed EClass XVariableDeclaration from imported package http://www.eclipse.org/xtext/xbase/Xbase. The existing reference 'type' has an incompatible type 'null'.' Reproducible: Always