Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Problem with inferred type and super type declaration(Simple Xbase-based inferrer yields error "equivalent could not be computed")
Problem with inferred type and super type declaration [message #1731350] Wed, 04 May 2016 13:42 Go to next message
Michael Szvetits is currently offline Michael SzvetitsFriend
Messages: 5
Registered: May 2016
Junior Member
Hi,

I have a problem with a very simple grammar and its associated model inferrer. The language enables to chain transformations to be applied to an implicitly existing List<Object>. The grammar looks as follows:

Query:
	expressions+=MapExpression ('.' expressions+=MapExpression)*;

MapExpression:
	'map' '(' lambda=LambdaExpression ')';

LambdaExpression:
	'\\' param=JvmFormalParameter '->' body=XExpressionInClosure;

An example instance of the language would be:

map(\obj -> obj.toString).map(\x -> x.length)

The challenge is now to generate the JVM model in a way that the types match, so the first lambda expression should yield a method that maps an Object to a String, and the second lambda expression should yield a method that maps a String to an Integer. I tried to create the JVM model by mapping the lambda expressions to classes that inherit from org.eclipse.xtext.xbase.lib.Functions.Function1 and implementing their methods named apply:

package org.xtext.example.mydsl.jvmmodel

import com.google.inject.Inject
import org.eclipse.xtext.xbase.jvmmodel.AbstractModelInferrer
import org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor
import org.eclipse.xtext.xbase.jvmmodel.JvmTypesBuilder
import org.eclipse.xtext.xbase.lib.Functions.Function1
import org.xtext.example.mydsl.myDsl.Query

class MyDslJvmModelInferrer extends AbstractModelInferrer {
	public static val INFERRED_CLASS_NAME = 'MyProgram'
	
	@Inject extension JvmTypesBuilder

	def dispatch void infer(Query query, IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) {
		acceptor.accept(query.toClass(INFERRED_CLASS_NAME)) [
			var i = 0
			var type = typeRef(Object)
			
			for (expr : query.expressions) {
				val currentType = type
				val lambda = expr.lambda
				
				members += lambda.toClass('Lambda' + i) [
					members +=  lambda.toMethod('apply', inferredType(lambda.body)) [
						annotations += annotationRef(Override)
						parameters += lambda.param.toParameter(lambda.param.name, currentType)
						body = lambda.body
					]
					
					superTypes += typeRef(Function1, currentType, inferredType(lambda.body))
				]
						
				type = inferredType(lambda.body)
				i = i + 1
			}
		]
	}
}

So the strategy is to remember the inferred type from the previous transformation and use it as type for the parameter of the next transformation. Although the code gets generated, the super type declaration is not generated (the "implements Function1<...>" of the generated inner classes are missing) and I get an error "equivalent could not be computed". I suspected that the part "inferredType(lambda.body)" is the problem, so for debugging purposes I tried the following line for declaring the super type instead:

superTypes += typeRef(Function1, currentType, typeRef(String))

But then only the first transformation is generated correctly, the error remains for all other transformations (the super type declarations are not generated).

Another general problem that I noticed is that I can only access the parameter of the first lambda expression within its body, for all other transformations it does not work. So this works

map(\a -> a.toString)

while this does not

map(\a -> a.toString).map(x -> x + "hi")

but this works also

map(\a -> a.toString).map(x -> 1 + 2)

It seems that the transition of the types from one transformation to the other is faulty.

Does anyone have a hint how to make this simple example work?

Best regards,
Michael
Re: Problem with inferred type and super type declaration [message #1731397 is a reply to message #1731350] Wed, 04 May 2016 23:47 Go to previous messageGo to next message
Miguel Jimenez is currently offline Miguel JimenezFriend
Messages: 40
Registered: July 2015
Member
Hi,

This is an interesting DSL. This is what I would try:

The "equivalent could not be computed" is being thrown probably from "inferredType(lambda.body)". Xbase needs to know what's the type of that expression. I think you should create a type computer, putting that expression in context, so Xbase knows its type and it can infer it.

Example:

class MyDslTypeComputer extends XbaseTypeComputer {
       override computeTypes(XExpression expression, ITypeComputationState state) {
		switch (expression) {
			LambdaExpression: _computeTypes(expression, state)
			default: super.computeTypes(expression, state)
		}
	}

        def protected _computeTypes(LambdaExpression expression, ITypeComputationState state) {
		// Compute type for the inner expressions
		state.withinScope(expression)
		val noExpectationState = state.withoutExpectation()
		noExpectationState.computeTypes(expression. body)
		addLocalToCurrentScope(expression. body, state)
		
		// set the actual type for the entire expression
		val result = getRawTypeForName(Object, state) // What would be the type of a LambdaExpression?
		state.acceptActualType(result)
	}
}


And don't forget to configure the Runtime Module:

class MyDslRuntimeModule extends AbstractMyDslRuntimeModule {
	def Class<? extends ITypeComputer> bindITypeComputer() {
		return MyDslTypeComputer
	}
}


I hope this guide you to a solution.

Miguel.
Re: Problem with inferred type and super type declaration [message #1731448 is a reply to message #1731397] Thu, 05 May 2016 11:10 Go to previous message
Michael Szvetits is currently offline Michael SzvetitsFriend
Messages: 5
Registered: May 2016
Junior Member
Hi Miguel,

thank you for your response. Unfortunately, I am not sure if the type computer helps here, since LambdaExpression does not inherit from XExpression, and I guess it doesn't have to?

I tried to simplify the problem by not generating inner classes, but instead generate simple methods from the lambda expressions:

class MyDslJvmModelInferrer extends AbstractModelInferrer {
	public static val INFERRED_CLASS_NAME = 'MyProgram'
	
	@Inject extension JvmTypesBuilder

	def dispatch void infer(Query query, IJvmDeclaredTypeAcceptor acceptor, boolean isPreIndexingPhase) {
		acceptor.accept(query.toClass(INFERRED_CLASS_NAME)) [
			var i = 0
			var type = typeRef(Object)
			
			for (expr : query.expressions) {
				val currentType = type
				val lambda = expr.lambda
				
				members += lambda.toMethod('lambda' + i, lambda.body.inferredType) [
					parameters += lambda.param.toParameter(lambda.param.name, currentType)
					body = lambda.body
				]
				
				type = lambda.body.inferredType
				i = i + 1
			}
		]
	}
}

If I now try something like this:

map(\b -> "hi").map(\a -> 1).map(\b -> true)

it works and the generated code is this:

public class MyProgram {
  public String lambda0(final Object b) {
    return "hi";
  }
  
  public int lambda1(final String a) {
    return 1;
  }
  
  public boolean lambda2(final int b) {
    return true;
  }
}

Obviously, the types are correctly transferred from one expression to the other: Object -> String, String -> int, int -> boolean

Now if I try to access the parameter within the first lambda expression like this:

map(\b -> b.toString).map(\a -> 1).map(\b -> true)

it works too with the expected result:

public class MyProgram {
  public String lambda0(final Object b) {
    return b.toString();
  }
  
  public int lambda1(final String a) {
    return 1;
  }
  
  public boolean lambda2(final int b) {
    return true;
  }
}

But if I try to use the parameter in one of the other lambda expressions like this:

map(\b -> "hi").map(\a -> a.length).map(\b -> true)

I run into the following error:

java.lang.UnsupportedOperationException: TODO: import a functional handle on the type resolution that delegates to the best available (current, but evolving) result
	at org.eclipse.xtext.xbase.typesystem.internal.DefaultReentrantTypeResolver.reentrantResolve(DefaultReentrantTypeResolver.java:133)
	at org.eclipse.xtext.xbase.typesystem.internal.CachingBatchTypeResolver$LazyResolvedTypes.resolveTypes(CachingBatchTypeResolver.java:80)
	at org.eclipse.xtext.xbase.typesystem.internal.CachingBatchTypeResolver$2.process(CachingBatchTypeResolver.java:57)
	at org.eclipse.xtext.xbase.typesystem.internal.CachingBatchTypeResolver$2.process(CachingBatchTypeResolver.java:1)
	at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)
	at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:129)
	at org.eclipse.xtext.xbase.typesystem.internal.CachingBatchTypeResolver.doResolveTypes(CachingBatchTypeResolver.java:53)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractBatchTypeResolver.resolveTypes(AbstractBatchTypeResolver.java:69)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractBatchTypeResolver.resolveTypes(AbstractBatchTypeResolver.java:55)
	at org.eclipse.xtext.xbase.typesystem.InferredTypeIndicator.getTypeReference(InferredTypeIndicator.java:71)
	at org.eclipse.xtext.xtype.impl.XComputedTypeReferenceImplCustom.getEquivalent(XComputedTypeReferenceImplCustom.java:46)
	at org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReferenceFactory.doVisitComputedTypeReference(LightweightTypeReferenceFactory.java:165)
	at org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReferenceFactory.doVisitComputedTypeReference(LightweightTypeReferenceFactory.java:1)
	at org.eclipse.xtext.xtype.impl.XComputedTypeReferenceImplCustom.accept(XComputedTypeReferenceImplCustom.java:27)
	at org.eclipse.xtext.common.types.util.AbstractTypeReferenceVisitor.visit(AbstractTypeReferenceVisitor.java:34)
	at org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReferenceFactory.toLightweightReference(LightweightTypeReferenceFactory.java:83)
	at org.eclipse.xtext.xbase.typesystem.references.StandardTypeReferenceOwner.toLightweightTypeReference(StandardTypeReferenceOwner.java:117)
	at org.eclipse.xtext.xbase.typesystem.internal.ResolvedTypes.doGetDeclaredType(ResolvedTypes.java:994)
	at org.eclipse.xtext.xbase.typesystem.internal.StackedResolvedTypes.doGetDeclaredType(StackedResolvedTypes.java:279)
	at org.eclipse.xtext.xbase.typesystem.internal.ResolvedTypes.doGetActualType(ResolvedTypes.java:957)
	at org.eclipse.xtext.xbase.typesystem.internal.ResolvedTypes.getActualType(ResolvedTypes.java:945)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractLinkingCandidate.getDeclaredType(AbstractLinkingCandidate.java:610)
	at org.eclipse.xtext.xbase.typesystem.internal.FeatureLinkingCandidate.getDeclaredType(FeatureLinkingCandidate.java:1131)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractLinkingCandidate.applyToComputationState(AbstractLinkingCandidate.java:288)
	at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer._computeTypes(XbaseTypeComputer.java:1036)
	at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer.computeTypes(XbaseTypeComputer.java:99)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.doComputeTypes(AbstractTypeComputationState.java:121)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.computeTypes(AbstractTypeComputationState.java:109)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState$1.getActualType(AbstractTypeComputationState.java:403)
	at org.eclipse.xtext.xbase.scoping.batch.FeatureScopes.createFeatureCallScopeForReceiver(FeatureScopes.java:215)
	at org.eclipse.xtext.xbase.scoping.batch.FeatureScopes.createFeatureCallScope(FeatureScopes.java:92)
	at org.eclipse.xtext.xbase.scoping.batch.AbstractFeatureScopeSession.createFeatureCallScope(AbstractFeatureScopeSession.java:177)
	at org.eclipse.xtext.xbase.scoping.batch.AbstractFeatureScopeSession.getScope(AbstractFeatureScopeSession.java:48)
	at org.eclipse.xtext.xbase.typesystem.internal.ScopeProviderAccess.getCandidateDescriptions(ScopeProviderAccess.java:142)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.getLinkingCandidates(AbstractTypeComputationState.java:409)
	at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer._computeTypes(XbaseTypeComputer.java:1031)
	at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer.computeTypes(XbaseTypeComputer.java:99)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.doComputeTypes(AbstractTypeComputationState.java:121)
	at org.eclipse.xtext.xbase.typesystem.internal.ExpressionTypeComputationState.doComputeTypes(ExpressionTypeComputationState.java:59)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.computeTypes(AbstractTypeComputationState.java:109)
	at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer._computeTypes(XbaseTypeComputer.java:472)
	at org.eclipse.xtext.xbase.typesystem.computation.XbaseTypeComputer.computeTypes(XbaseTypeComputer.java:105)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.doComputeTypes(AbstractTypeComputationState.java:121)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractTypeComputationState.computeTypes(AbstractTypeComputationState.java:109)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractRootTypeComputationState.computeTypes(AbstractRootTypeComputationState.java:32)
	at org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareReentrantTypeResolver._computeTypes(LogicalContainerAwareReentrantTypeResolver.java:820)
	at org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareReentrantTypeResolver.computeTypes(LogicalContainerAwareReentrantTypeResolver.java:704)
	at org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareReentrantTypeResolver.computeMemberTypes(LogicalContainerAwareReentrantTypeResolver.java:890)
	at org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareReentrantTypeResolver._computeTypes(LogicalContainerAwareReentrantTypeResolver.java:879)
	at org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareReentrantTypeResolver.computeTypes(LogicalContainerAwareReentrantTypeResolver.java:698)
	at org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareReentrantTypeResolver.computeTypes(LogicalContainerAwareReentrantTypeResolver.java:690)
	at org.eclipse.xtext.xbase.typesystem.internal.DefaultReentrantTypeResolver.resolve(DefaultReentrantTypeResolver.java:163)
	at org.eclipse.xtext.xbase.typesystem.internal.DefaultReentrantTypeResolver.reentrantResolve(DefaultReentrantTypeResolver.java:139)
	at org.eclipse.xtext.xbase.typesystem.internal.CachingBatchTypeResolver$LazyResolvedTypes.resolveTypes(CachingBatchTypeResolver.java:80)
	at org.eclipse.xtext.xbase.typesystem.internal.CachingBatchTypeResolver$2.process(CachingBatchTypeResolver.java:57)
	at org.eclipse.xtext.xbase.typesystem.internal.CachingBatchTypeResolver$2.process(CachingBatchTypeResolver.java:1)
	at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)
	at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:129)
	at org.eclipse.xtext.xbase.typesystem.internal.CachingBatchTypeResolver.doResolveTypes(CachingBatchTypeResolver.java:53)
	at org.eclipse.xtext.xbase.typesystem.internal.AbstractBatchTypeResolver.resolveTypes(AbstractBatchTypeResolver.java:69)
	at org.eclipse.xtext.xbase.resource.BatchLinkingService.resolveBatched(BatchLinkingService.java:60)
	at org.eclipse.xtext.xbase.resource.BatchLinkingService.resolveBatched(BatchLinkingService.java:41)
	at org.eclipse.xtext.xbase.resource.BatchLinkableResource.getEObject(BatchLinkableResource.java:117)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:223)
	at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:203)
	at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:259)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1477)
	at org.eclipse.xtext.xbase.impl.XAbstractFeatureCallImplCustom.getFeature(XAbstractFeatureCallImplCustom.java:48)
	at org.eclipse.xtext.xbase.util.FeatureCallAsTypeLiteralHelper.getRootTypeLiteral(FeatureCallAsTypeLiteralHelper.java:128)
	at org.eclipse.xtext.xbase.resource.XbaseLocationInFileProvider.getSignificantTextRegion(XbaseLocationInFileProvider.java:54)
	at org.eclipse.xtext.xbase.jvmmodel.JvmLocationInFileProvider.getSignificantTextRegion(JvmLocationInFileProvider.java:43)
	at org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider.createEObjectNode(DefaultOutlineTreeProvider.java:196)
	at org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider._createNode(DefaultOutlineTreeProvider.java:163)
	at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:296)
	at org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider.createNode(DefaultOutlineTreeProvider.java:142)
	at org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider._createChildren(DefaultOutlineTreeProvider.java:123)
	at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:296)
	at org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider.createChildren(DefaultOutlineTreeProvider.java:114)
	at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$1.process(AbstractOutlineNode.java:102)
	at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$1.process(AbstractOutlineNode.java:1)
	at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)
	at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$2.exec(AbstractOutlineNode.java:217)
	at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode$2.exec(AbstractOutlineNode.java:1)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:121)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:520)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:492)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:133)
	at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode.readOnly(AbstractOutlineNode.java:208)
	at org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode.getChildren(AbstractOutlineNode.java:99)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.restoreChildrenSelectionAndExpansion(OutlineRefreshJob.java:120)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.restoreChildrenSelectionAndExpansion(OutlineRefreshJob.java:125)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.restoreChildrenSelectionAndExpansion(OutlineRefreshJob.java:125)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.restoreChildrenSelectionAndExpansion(OutlineRefreshJob.java:125)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.restoreChildrenSelectionAndExpansion(OutlineRefreshJob.java:125)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob$2.exec(OutlineRefreshJob.java:93)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob$2.exec(OutlineRefreshJob.java:1)
	at org.eclipse.xtext.util.concurrent.CancelableUnitOfWork.exec(CancelableUnitOfWork.java:26)
	at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:121)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:520)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:492)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:133)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob.internalRefreshOutlineModel(OutlineRefreshJob.java:89)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob$1.run(OutlineRefreshJob.java:78)
	at org.eclipse.xtext.ui.editor.outline.impl.OutlineRefreshJob$1.run(OutlineRefreshJob.java:1)
	at org.eclipse.xtext.ui.util.DisplayRunnableWithResult$1.run(DisplayRunnableWithResult.java:26)
	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162)
	at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:154)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3794)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3433)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

It seems that the first lambda expression works fine, since the initial type is Object and does not need to be inferred. For other lambda expressions where the parameter type is inferred from the previous expression, it does not work.

Since the error has a TODO in it, I am not sure if this is a bug or my fault. Any suggestions how to get this running, even if a workaround is needed?

Best regards,
Michael
Previous Topic:Xbase, Using XbaseBatchScopeProvider
Next Topic:Create Model Element/Object on Validation
Goto Forum:
  


Current Time: Thu Apr 25 01:56:37 GMT 2024

Powered by FUDForum. Page generated in 0.03290 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top