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

@warning_ignore(standalone_expression) not working #68446

Closed
rbarongr opened this issue Nov 9, 2022 · 2 comments
Closed

@warning_ignore(standalone_expression) not working #68446

rbarongr opened this issue Nov 9, 2022 · 2 comments

Comments

@rbarongr
Copy link

rbarongr commented Nov 9, 2022

Godot version

Godot 4 Beta 4

System information

Windows 10 and macOS (Intel and M1)

Issue description

When you write @warning_ignore(standalone_expression) in the previous line that gives the warning it simply doesn't ignore the warning.

You can write something like:

@warning_ignore(standalone_expression)
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) if capture else Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)

And the warning stills pops up when you run the project.

I have used some others @warning_ignore like @warning_ignore(return_value_discarded) and this one works fine but I didn't test all of the warnings.

Steps to reproduce

  1. Write an if statement as a ternary operation that doesn't set any variable.
  2. Run the project: see the warning of standalone expression
  3. Write the @warning_ignore(standalone_expression) if the previous line of the if statement
  4. Run the project: still the warning appears in the Debugger errors

Minimal reproduction project

Run the main scene of this project to get the warning:

warning-issue.zip

@clayjohn clayjohn added this to the 4.x milestone Nov 9, 2022
@KoBeWi KoBeWi removed this from the 4.x milestone Nov 9, 2022
@h0lley
Copy link

h0lley commented Dec 27, 2022

duplicate of #56592 ?

@rbarongr
Copy link
Author

duplicate of #56592 ?

yes, closing this one

@rbarongr rbarongr closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants