You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[GDScript] Fix get_argument_count for lambda Callables
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# https://github.com/godotengine/godot/issues/93952
|
||||
|
||||
func foo():
|
||||
pass
|
||||
|
||||
func test():
|
||||
var a: int
|
||||
|
||||
var lambda_self := func (x: int) -> void:
|
||||
foo()
|
||||
print(a, x)
|
||||
|
||||
print(lambda_self.get_argument_count()) # Should print 1.
|
||||
|
||||
var lambda_non_self := func (x: int) -> void:
|
||||
print(a, x)
|
||||
|
||||
print(lambda_non_self.get_argument_count()) # Should print 1.
|
||||
@@ -0,0 +1,3 @@
|
||||
GDTEST_OK
|
||||
1
|
||||
1
|
||||
Reference in New Issue
Block a user