Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345449 - [xtend] syntax error causes exception
Summary: [xtend] syntax error causes exception
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 11:33 EDT by Moritz Eysholdt CLA
Modified: 2017-09-19 17:22 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2011-05-11 11:33:55 EDT
expression
----
val result = <$ISynAbsorberState>newArrayList()
----

(note the invalid $)

causes (on typing)


org.eclipse.emf.common.util.WrappedException: java.lang.IllegalArgumentException: null was: L$ISynAbsorberState;
	at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:200)
	at org.eclipse.xtext.xtend2.resource.Xtend2Resource.getEObject(Xtend2Resource.java:74)
	at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReference(LazyLinkingResource.java:138)
	at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReferences(LazyLinkingResource.java:102)
	at org.eclipse.xtext.EcoreUtil2.resolveLazyCrossReferences(EcoreUtil2.java:417)
	at org.eclipse.xtext.validation.ResourceValidatorImpl.resolveProxies(ResourceValidatorImpl.java:127)
	at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:62)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:79)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob$1.exec(ValidationJob.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:86)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob.createIssues(ValidationJob.java:75)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:64)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.IllegalArgumentException: null was: L$ISynAbsorberState;
	at org.eclipse.xtext.common.types.access.jdt.TypeURIHelper.createResourceURI(TypeURIHelper.java:370)
	at org.eclipse.xtext.common.types.access.jdt.TypeURIHelper.createResourceURI(TypeURIHelper.java:34)
	at org.eclipse.xtext.common.types.access.jdt.JdtTypeProvider.findTypeByName(JdtTypeProvider.java:62)
	at org.eclipse.xtext.common.types.xtext.AbstractTypeScope.getSingleElement(AbstractTypeScope.java:55)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.scoping.impl.AbstractScope.getSingleElement(AbstractScope.java:104)
	at org.eclipse.xtext.linking.impl.DefaultLinkingService.getLinkedObjects(DefaultLinkingService.java:121)
	at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:169)
	... 13 more
Caused by: java.lang.IllegalArgumentException
	at org.eclipse.jdt.core.Signature.appendClassTypeSignature(Signature.java:2501)
	at org.eclipse.jdt.core.Signature.appendTypeSignature(Signature.java:2350)
	at org.eclipse.jdt.core.Signature.appendTypeSignature(Signature.java:2296)
	at org.eclipse.jdt.core.Signature.toCharArray(Signature.java:2275)
	at org.eclipse.jdt.core.Signature.toString(Signature.java:2752)
	at org.eclipse.xtext.common.types.access.jdt.TypeURIHelper.createResourceURIForClassImpl(TypeURIHelper.java:409)
	at org.eclipse.xtext.common.types.access.jdt.TypeURIHelper.createResourceURIForClass(TypeURIHelper.java:397)
	at org.eclipse.xtext.common.types.access.jdt.TypeURIHelper.createResourceURI(TypeURIHelper.java:361)
	... 29 more
Comment 1 Sebastian Zarnekow CLA 2011-05-11 11:37:20 EDT
Good catch.

We should add a smoke test that uses inner classes.
Comment 2 Sven Efftinge CLA 2011-05-12 03:43:47 EDT
I've added a catch clause for IllegalArgumentExceptions in AbstractTypeScope
Comment 3 Sebastian Zarnekow CLA 2011-07-26 05:15:06 EDT
Added a smoke test for this scenario.
Comment 4 Karsten Thoms CLA 2017-09-19 17:10:22 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:22:05 EDT
Closing all bugs that were set to RESOLVED before Neon.0