Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set and clone Expression Environment after Expression cloning #2617

Merged
merged 7 commits into from Mar 15, 2024

Conversation

MineFact
Copy link
Contributor

Overview

Fixes #2616

Description

This Pull Requests sets the WorldEditExpressionEnvironment after an Expression gets cloned to make sure that the Functions class remains its environment after cloning to not run into a NullPointerException.
When the Expression is cloned, the WorldEditExpressionEnvironment gets cloned as well while making sure that the offset of the environment is not changing during the cloning process.

Submitter Checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter Checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
    Options
  2. Ensure that the pull request title represents the desired changelog entry.
    Options
  3. New public fields and methods are annotated with @since TODO.
    Options
  4. I read and followed the contribution guidelines.
    Options

@MineFact MineFact requested a review from a team as a code owner March 13, 2024 08:33
@github-actions github-actions bot added the Bugfix This PR fixes a bug label Mar 13, 2024
Copy link
Member

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

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

A few small suggestions

@PierreSchwang
Copy link
Member

I'd say ExpressionEnvironment should implement Clonable, if there is already the clone method

Copy link
Member

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@dordsor21 dordsor21 merged commit df9527b into IntellectualSites:main Mar 15, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix This PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mask queries don't work anymore
6 participants