You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
GDScript: Perform validated calls with static methods
When the types are validated at compile time, this type of call runs faster. It is already used for instance methods, this adds this optimization to native static methods as well.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
func test():
|
||||
# Validated native static call with return value.
|
||||
print(FileAccess.file_exists("some_file"))
|
||||
|
||||
# Validated native static call without return value.
|
||||
Node.print_orphan_nodes()
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_OK
|
||||
false
|
||||
Reference in New Issue
Block a user