Allow free() to be used as Callable
This method is registered in a special way so ClassDB doesn't naturally know about its existence. Here it is hardcoded if any other option fail to check if it is about the `free()` method and, if so, say it exists and return a Callable.
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
func test():
|
||||
var node := Node.new()
|
||||
var callable: Callable = node.free
|
||||
callable.call()
|
||||
print(node)
|
||||
|
||||
node = Node.new()
|
||||
callable = node["free"]
|
||||
callable.call()
|
||||
print(node)
|
||||
@ -0,0 +1,3 @@
|
||||
GDTEST_OK
|
||||
<Freed Object>
|
||||
<Freed Object>
|
||||
Reference in New Issue
Block a user