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
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
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")