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:
parent
107f2961cc
commit
b4e08eb752
4 changed files with 22 additions and 1 deletions
|
|
@ -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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue