Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366143

Summary: Missing error message for invalid_generic_argument_types
Product: [Modeling] TMF Reporter: Carlo M-R <carlo.mueller-reichenwallner>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: Holger.Schill, sven.efftinge
Version: 2.1.1Flags: sven.efftinge: juno+
Target Milestone: M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Carlo M-R CLA 2011-12-09 03:26:47 EST
Build Identifier: 

In the Scope provider we get an error after upgrading from Xtext 2.0.1 to Xtext 2.2.0:

	def IScope scope_MetaData_type(Entity ctx, EReference ref) {
		new FilteringDelegateScope(delegateGetScope(ctx, ref), [d|d.qualifiedName.toString.startsWith('foo.bar.')]);
	}

Missig error message for org.eclipse.xtext.xbase.validation.IssueCodes.invalid_generic_argument_types

The FilteringDelegateScope is a custom class with following constructors:

public FilteringDelegateScope(IScope delegate, Function1<IEObjectDescription, Boolean> predicate) {}
public FilteringDelegateScope(IScope delegate, Predicate<IEObjectDescription> predicate) {}


Reproducible: Always
Comment 1 Holger Schill CLA 2011-12-09 07:35:46 EST
I think this is because on org.eclipse.xtext.xbase.validation.FeatureCallValidator.error(XConstructorCall, String) this case is not treated. Correct me if I am wrong.
Comment 2 Sven Efftinge CLA 2011-12-12 03:38:58 EST
I couldn't reproduce the error message.
It might be, that the bigger context (i.e. the rest of the Xtend file) is important.
Please try to provide a reduced example we can reproduce.

Note, that the code is not valid (although not checked yet).
Because the method is overloaded in a way, that the given expression could work for both.
We'll have a check for this in the future and you'll get an error message then.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=366359
Comment 3 Sven Efftinge CLA 2012-01-30 05:20:17 EST
Please reopen with a reproducible example.
Comment 4 Karsten Thoms CLA 2017-09-19 17:03:14 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:14:48 EDT
Closing all bugs that were set to RESOLVED before Neon.0