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

Bug 345823

Summary: [xtend] error logged for closure with untyped parameters
Product: [Modeling] TMF Reporter: Knut Wannheden <knut.wannheden>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sven.efftinge
Version: 2.0.0Flags: sven.efftinge: indigo+
Target Milestone: RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Knut Wannheden CLA 2011-05-14 15:58:51 EDT
When hitting save in an Xtend2 editor containing the following snippet:

	def bar() {
		val f = [e|e]
	}

the file is saved but not compiled. The error log contains the following error: org.eclipse.xtext.xtend2.ui.builder.Xtend2BuilderParticipant  - Error compiling platform:/resource/test/src/Test.xtend.

In the console the following stacktrace was logged:

1724656 [Worker-33] ERROR org.eclipse.xtext.xtend2.ui.builder.Xtend2BuilderParticipant  - Error compiling platform:/resource/test/src/Test.xtend
java.lang.IllegalArgumentException
	at org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler.serialize(AbstractXbaseCompiler.java:218)
	at org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler.serialize(AbstractXbaseCompiler.java:148)
	at org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler.serialize(AbstractXbaseCompiler.java:145)
	at org.eclipse.xtext.xbase.compiler.XbaseCompiler._toJavaStatement(XbaseCompiler.java:488)
	at org.eclipse.xtext.xtend2.compiler.Xtend2Compiler._toJavaStatement(Xtend2Compiler.java:479)
	at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291)
	at org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler.internalToJavaStatement(AbstractXbaseCompiler.java:111)
	at org.eclipse.xtext.xbase.compiler.XbaseCompiler._toJavaStatement(XbaseCompiler.java:159)
	at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291)
	at org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler.internalToJavaStatement(AbstractXbaseCompiler.java:111)
	at org.eclipse.xtext.xbase.compiler.XbaseCompiler._toJavaStatement(XbaseCompiler.java:52)
	at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291)
	at org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler.internalToJavaStatement(AbstractXbaseCompiler.java:111)
	at org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler.compile(AbstractXbaseCompiler.java:92)
	at org.eclipse.xtext.xtend2.compiler.Xtend2Compiler.compile(Xtend2Compiler.java:304)
	at org.eclipse.xtext.xtend2.compiler.Xtend2Compiler.compile(Xtend2Compiler.java:160)
	at org.eclipse.xtext.xtend2.compiler.Xtend2Compiler.compile(Xtend2Compiler.java:113)
	at org.eclipse.xtext.xtend2.ui.builder.Xtend2BuilderParticipant.compile(Xtend2BuilderParticipant.java:146)
	at
...
Comment 1 Sven Efftinge CLA 2011-05-15 04:19:47 EDT
*** Bug 345822 has been marked as a duplicate of this bug. ***
Comment 2 Sven Efftinge CLA 2011-05-15 05:12:52 EDT
I'm going to add a check for explicit type arguments to method and constructor invocation to not contain any wildcards.
Comment 3 Sven Efftinge CLA 2011-05-15 09:30:51 EDT
A validation rule now tells you that you have provided insufficient type information.
Comment 4 Karsten Thoms CLA 2017-09-19 17:57:30 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 18:08:18 EDT
Closing all bugs that were set to RESOLVED before Neon.0