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
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