1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

GDScript: Fix @warning_ignore annotation issues

This commit is contained in:
Danil Alexeev
2024-02-28 17:23:11 +03:00
parent 61282068f4
commit ef1909fca3
25 changed files with 603 additions and 209 deletions

View File

@@ -4,6 +4,7 @@ class Parent:
var parent_variable := 2
@warning_ignore("unused_signal")
signal parent_signal
var parent_attribute: int:

View File

@@ -14,6 +14,7 @@ func test():
print(v)
print()
@warning_ignore("standalone_ternary")
v=func(): print(2) if false else print(3)
@warning_ignore("unsafe_cast")
(v as Callable).call()

View File

@@ -14,3 +14,6 @@ func test():
print("This won't match")
_:
print("This will match")
match 0:
pass

View File

@@ -1,5 +1,3 @@
#GDTEST_OK
# No parentheses.
signal a
@@ -16,5 +14,15 @@ signal d(
c,
)
# With type hints.
signal e(a: int, b: Variant, c: Node)
func no_exec():
a.emit()
b.emit()
c.emit()
d.emit()
e.emit()
func test():
print("Ok")