-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
GDScript 2.0: ResourceSaver.save()
with using combined SaverFlags
shows an invalid warning INT_AS_ENUM_WITHOUT_CAST
#74593
Labels
Milestone
Comments
I think the problem is due to the signature of the ResourceSaver.save() method. For example in Object.connect(), the It looks like the reason is @tool
extends EditorScript
func _run() -> void:
var button := Button.new()
# Warnings: INT_AS_ENUM_WITHOUT_CAST, INT_AS_ENUM_WITHOUT_MATCH
button.button_mask = MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT
# OK
button.button_mask = MOUSE_BUTTON_MASK_LEFT
var tp := TextParagraph.new()
# Warnings: INT_AS_ENUM_WITHOUT_CAST, INT_AS_ENUM_WITHOUT_MATCH
tp.justification_flags = TextServer.JUSTIFICATION_WORD_BOUND \
| TextServer.JUSTIFICATION_CONSTRAIN_ELLIPSIS
# OK
tp.justification_flags = TextServer.JUSTIFICATION_WORD_BOUND
# OK (int, not BitField<T>)
connect(&"property_list_changed", func (): pass, CONNECT_DEFERRED | CONNECT_ONE_SHOT) |
MikeSchulze
added a commit
to MikeSchulze/gdUnit4
that referenced
this issue
Mar 9, 2023
# Why By default addons are excluded from code validation, after inclusion the plugin displays over 1800 warnings and some errors ![image](https://user-images.githubusercontent.com/347037/223846970-74dc362b-dcd2-48a0-9a6b-7137e4c1671b.png) # What - fix the errors - reduce the warnings - update inline documentation - apply formatting rules # Open issues -Only 23 warnings left, covered by the listed Godot issues ![image](https://user-images.githubusercontent.com/347037/224134816-2f3729bd-4aac-4cc5-af6d-3934b49a1b2f.png) - invalid warnings about enum [74593](godotengine/godot#74593) - INT_AS_ENUM_WITHOUT_CAST - INT_AS_ENUM_WITHOUT_MATCH - disable warnings not work [56592](godotengine/godot#56592) - shadowed_global_identifier
Closed for both master and 4.0. |
YuriSizov
changed the title
GDScript 2.0:
GDScript 2.0: Jun 23, 2023
ResourceSaver.save()
with using combined SaverFlags
shows an invalid warning INT_AS_ENUM_WITHOUT_CAST
`ResourceSaver.save()
with using combined SaverFlags
shows an invalid warning INT_AS_ENUM_WITHOUT_CAST
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot version
v4.0.stable.official [92bee43]
System information
Windows 10, MacOS
Issue description
I actually fixing all the warnings that popup in my plugin after remove the default exclude script checks for the addons folder.
Using
ResourceSaver.save
says:The flags bitmask can be specified to customize the save behavior using SaverFlags flags.
But let the compiler do report incorrect warnings
using the flags as bitmask (
ResourceSaver.FLAG_BUNDLE_RESOURCES|ResourceSaver.FLAG_REPLACE_SUBRESOURCE_PATHS
) is popup warnings.Steps to reproduce
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: