Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363196 - Problem with compatible feature type when redefining variable declaration from xbase
Summary: Problem with compatible feature type when redefining variable declaration fro...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-08 11:36 EST by Goran CLA
Modified: 2017-09-19 17:22 EDT (History)
3 users (show)

See Also:
sebastian.zarnekow: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Goran CLA 2011-11-08 11:36:40 EST
Build Identifier: I20110613-1736

The following error message is shown when redefining the syntax of variable declarations from Xbase:

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'. The expected type is 'JvmTypeReference'.

See forum : http://www.eclipse.org/forums/index.php/t/261672/

It happens when using the following grammar:


grammar org.xtext.example.mydsl2.MyDsl with org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations

generate myDsl "http://www.xtext.org/example/mydsl2/MyDsl"

import "http://www.eclipse.org/xtext/xbase/Xbase"
import "http://www.eclipse.org/xtext/common/JavaVMTypes" as jvmTypes
import "http://www.eclipse.org/emf/2002/Ecore" as ecore

Model:
	greetings+=Greeting*;
	
Greeting:
	'Hello' name=ID '!';

JavaVariableDeclarator  returns XVariableDeclaration:
	{XVariableDeclaration} writeable?='final'? (type=JvmTypeReference name=ValidID) ('=' right=XExpression)? ';'
;


Reproducible: Always

Steps to Reproduce:
1. Do a fresh eclipse/xtext install 
2. Create a new Xtext project
3. Copy the very short grammar to the mydsl.xtext file.
Comment 1 Sebastian Zarnekow CLA 2011-11-10 06:01:30 EST
Successfully tested with a fresh eclipse and the latest nightly from master and maintenance.
Comment 2 Karsten Thoms CLA 2017-09-19 17:10:56 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:22:36 EDT
Closing all bugs that were set to RESOLVED before Neon.0