You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot does not provide metadata about default parameters yet. Since it can't be known which parameters are defaulted, GUT defaults ALL parameters to ALL methods to null. This can cause hard to figure out issues when you do a partial_double (or stub a method to_call_super) and a method has a parameter that is defaulted to something other than null.
Example:
var_sum=0funcincrement(inc_by=1):
_sum+=inc_by
The double definition for increment will be:
funcincrement(inc_by=null):
If this method is part of a partial_double or is stubbed to_call_super and is called without parameters during a test (directly or indirectly) then this will cause an Invalid operands 'int' and 'Nil' error.
The text was updated successfully, but these errors were encountered:
Godot does not provide metadata about default parameters yet. Since it can't be known which parameters are defaulted, GUT defaults ALL parameters to ALL methods to
null
. This can cause hard to figure out issues when you do apartial_double
(or stub a methodto_call_super
) and a method has a parameter that is defaulted to something other thannull
.Example:
The
double
definition forincrement
will be:If this method is part of a
partial_double
or is stubbedto_call_super
and is called without parameters during a test (directly or indirectly) then this will cause anInvalid operands 'int' and 'Nil'
error.The text was updated successfully, but these errors were encountered: