Skip to content

Conversation

@mhuster23
Copy link
Member

fixes #1518

@mhuster23 mhuster23 marked this pull request as ready for review November 28, 2025 13:41
@alexanderpann alexanderpann self-requested a review December 3, 2025 06:51
Copy link
Member

@alexanderpann alexanderpann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works but in the constraints not only short lambda expressions should be allowed but also lambda expressions.

@mhuster23
Copy link
Member Author

Thanks for the review. The structure only allows ShortLambdaExpression as well, so we can't widen it to lambda expressions without changes to the structure.
If we want to support other Lambda Expressions as well we would need a new common (abstract) superconcept that extends Expression and implements ILambdaLike. As we can't use ILambdaLike for the link as it is not a subconcept of OneArgCollectionOp.
I'm not sure if we want this.

@alexanderpann
Copy link
Member

Right, but then the intention transformIntoExplicitVersion has to be fixed. It currently allows changing the lambda for the ForeachOP to a lambda expression.

@mhuster23 mhuster23 force-pushed the bugfix/foreach-op-lambda branch from b13eadf to 451a7d1 Compare December 18, 2025 09:14
@mhuster23
Copy link
Member Author

mhuster23 commented Dec 18, 2025

I didn't like that forEach was treated differently than other operations. So I tried a different approach, that unifies the behavior but also affects other operations that use lambdas.

Removing the arg specialization does not break models but it will break usages of the link, however this is probably fine because the name is the same so a refresh will re-resolve usages.

@mhuster23 mhuster23 force-pushed the bugfix/foreach-op-lambda branch from 451a7d1 to 2053cd1 Compare December 18, 2025 10:15
@mhuster23 mhuster23 force-pushed the bugfix/foreach-op-lambda branch from 2053cd1 to d615ade Compare December 18, 2025 10:57
@mhuster23 mhuster23 linked an issue Dec 18, 2025 that may be closed by this pull request
Copy link
Member

@alexanderpann alexanderpann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I guess the breaking of the link can't be avoided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ForeachOp specializes child link not enforced by MPS

3 participants