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

Variable getSource is always the converted expression #7395

Open
1 task done
TheLimeGlass opened this issue Jan 5, 2025 · 0 comments
Open
1 task done

Variable getSource is always the converted expression #7395

TheLimeGlass opened this issue Jan 5, 2025 · 0 comments

Comments

@TheLimeGlass
Copy link
Contributor

TheLimeGlass commented Jan 5, 2025

Skript/Server Version

[20:10:38 ERROR]: #!#! Skript: 2.10.0-pre1-nightly-5a4fb7ed0 (development)
[20:10:38 ERROR]: #!#!     Flavor: skriptlang-nightly
[20:10:38 ERROR]: #!#!     Date: 20:09:29.987346300
[20:10:38 ERROR]: #!#! Bukkit: 1.21.4-R0.1-SNAPSHOT
[20:10:38 ERROR]: #!#! Minecraft: 1.21.4
[20:10:38 ERROR]: #!#! Java: 21.0.3

Bug Description

When executing getExpr().getSource() where getExpr() is an Entity in a Variable and the calling expression class is calling for %location%,

The source will still be a Location.

See ExprCoordinate for the underlying issue class #6686

More details at #7394

Expected Behavior

The source should be a Variable instance of the Entity that was set originally and not the converted Location expression.

Steps to Reproduce

Run code from #6686 and attempt to get the getExpr() within the change or execute in ExprCoordinate. The getSource will always be a Location.

Errors or Screenshots

No response

Other

I believe either the source is forgotten to be added when converting or the source is considered transient for global variables, because saving two instances of the same variable makes no sense.

Where as local variables should be keeping this reference.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
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

No branches or pull requests

1 participant