-
Notifications
You must be signed in to change notification settings - Fork 28
Labels
MPS 2023.2Target MPS version of the issueTarget MPS version of the issue
Description
In case you have a ForeachOp where the ShortLambdaExpression child is removed manually MPS provides you a generic list of all possible expressions. This leads to the following error.
Atm. there is no constraint for the ForeachOp which would enforce a valid can be parent/can be child relationship.
an error occurred while applying rule to node (instance of ForeachOp)
java.lang.IllegalArgumentException: Illegal parameter : org.iets3.core.expr.simpleTypes.structure.NumberLiteral is not a subconcept of org.iets3.core.expr.lambda.structure.ILambdaLike
at jetbrains.mps.core.aspects.behaviour.BehaviorChecker.checkForConcept(BehaviorChecker.java:80)
at jetbrains.mps.core.aspects.behaviour.SMethodImpl.invoke0(SMethodImpl.java:146)
at jetbrains.mps.core.aspects.behaviour.SMethodImpl.invoke(SMethodImpl.java:128)
at o.i.c.expr.collections//org.iets3.core.expr.collections.typesystem.check_ForeachOp_NonTypesystemRule.applyRule(check_ForeachOp_NonTypesystemRule.java:25)
at jetbrains.mps.newTypesystem.context.typechecking.IncrementalTypechecking.applyRuleToNode(IncrementalTypechecking.java:157)
at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.lambda$applyNonTypesystemRulesToNode$2(NonTypeSystemComponent.java:349)
at jetbrains.mps.newTypesystem.context.typechecking.IncrementalTypechecking.runApplyRulesTo(IncrementalTypechecking.java:166)
at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.applyNonTypesystemRulesToNode(NonTypeSystemComponent.java:324)
at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.applyRulesToRoot(NonTypeSystemComponent.java:312)
at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.lambda$applyNonTypeSystemRulesToRoot$1(NonTypeSystemComponent.java:297)
at jetbrains.mps.languageScope.LanguageScopeExecutor.execWithModelScope(LanguageScopeExecutor.java:63)
at jetbrains.mps.languageScope.LanguageScopeExecutor.execWithModelScope(LanguageScopeExecutor.java:43)
at jetbrains.mps.newTypesystem.context.component.NonTypeSystemComponent.applyNonTypeSystemRulesToRoot(NonTypeSystemComponent.java:297)
at jetbrains.mps.newTypesystem.context.typechecking.IncrementalTypechecking.applyNonTypesystemRulesToRoot(IncrementalTypechecking.java:227)
at jetbrains.mps.typesystem.checking.NonTypesystemEditorChecker.lambda$doCreateMessages$2(NonTypesystemEditorChecker.java:107)
at jetbrains.mps.newTypesystem.context.IncrementalTypecheckingContext.runTypeCheckingAction(IncrementalTypecheckingContext.java:165)
at jetbrains.mps.typesystem.checking.NonTypesystemEditorChecker.doCreateMessages(NonTypesystemEditorChecker.java:91)
at jetbrains.mps.typesystem.checking.AbstractTypesystemEditorChecker.lambda$update$0(AbstractTypesystemEditorChecker.java:121)
at jetbrains.mps.typechecking.backend.TypecheckingSessionHandler.computeWithSession(TypecheckingSessionHandler.java:61)
at jetbrains.mps.typesystem.checking.AbstractTypesystemEditorChecker.update(AbstractTypesystemEditorChecker.java:119)
at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession$HighlighterReadAction.perform(HighlighterUpdateSession.java:317)
at jetbrains.mps.nodeEditor.highlighter.EditorCheckerWrapper.withChecker(EditorCheckerWrapper.java:69)
at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession$HighlighterReadAction.execute(HighlighterUpdateSession.java:311)
at jetbrains.mps.smodel.CancellableReadAction.run(CancellableReadAction.java:86)
at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:98)
at jetbrains.mps.smodel.ActionDispatcher.lambda$wrap$0(ActionDispatcher.java:135)
at jetbrains.mps.smodel.LockRunnable.run(LockRunnable.java:60)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:895)
at jetbrains.mps.smodel.WorkbenchModelAccess.runReadAction(WorkbenchModelAccess.java:84)
at jetbrains.mps.smodel.ModelAccessBase.runReadAction(ModelAccessBase.java:56)
at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.updateEditor(HighlighterUpdateSession.java:218)
at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.updateEditorComponent(HighlighterUpdateSession.java:185)
at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.lambda$doUpdate$1(HighlighterUpdateSession.java:116)
at jetbrains.mps.typechecking.backend.TypecheckingSessionHandler.runWithSession(TypecheckingSessionHandler.java:76)
at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.doUpdate(HighlighterUpdateSession.java:114)
at jetbrains.mps.nodeEditor.highlighter.HighlighterUpdateSession.update(HighlighterUpdateSession.java:257)
at jetbrains.mps.nodeEditor.Highlighter$ScheduleHighlighterUpdate.update(Highlighter.java:490)
at jetbrains.mps.nodeEditor.Highlighter$ScheduleHighlighterUpdate.lambda$run$0(Highlighter.java:471)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
How to reproduce
- create a ForEachOp
- remove the the short lambda like that:
Metadata
Metadata
Assignees
Labels
MPS 2023.2Target MPS version of the issueTarget MPS version of the issue