Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345823 - [xtend] error logged for closure with untyped parameters
Summary: [xtend] error logged for closure with untyped parameters
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: RC1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 345822 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-14 15:58 EDT by Knut Wannheden CLA
Modified: 2017-09-19 18:08 EDT (History)
1 user (show)

See Also:
sven.efftinge: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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