GDScript: Avoid inferred types from giving hard errors
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
func inferred_parameter(param = null):
|
||||
if param == null:
|
||||
param = Node.new()
|
||||
param.name = "Ok"
|
||||
print(param.name)
|
||||
param.free()
|
||||
|
||||
func test():
|
||||
inferred_parameter()
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_OK
|
||||
Ok
|
||||
Reference in New Issue
Block a user