Merge pull request #86823 from dalexeev/gds-utility-func-as-callable

GDScript: Allow utility functions to be used as `Callable`
This commit is contained in:
Rémi Verschelde 2024-01-30 17:47:50 +01:00
commit 9572cf5ab2
No known key found for this signature in database
GPG key ID: C3336907360768E1
5 changed files with 219 additions and 20 deletions

View file

@ -0,0 +1,10 @@
func test():
print(print)
print(len)
prints.callv([1, 2, 3])
print(mini.call(1, 2))
print(len.bind("abc").call())
const ABSF = absf
print(ABSF.call(-1.2))

View file

@ -0,0 +1,7 @@
GDTEST_OK
@GlobalScope::print (Callable)
@GDScript::len (Callable)
1 2 3
1
3
1.2