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
Removing the integer cast will make the code incorrect as the function is supposed to return an int.
There's something interesting i've just learned. GDScript's static analyzer can determine function's return type based on its code, return type specifier isn't necessary. Thus the following function will have return type of null:
# @param Variant value
# @returns String|null
func _reextract(value):
var rematch = self._regex.search(value)
if rematch and rematch is RegExMatch:
return rematch.get_string()
return null
Which is the reason for this error. I got rid of the error by doing this instead:
if rematch and rematch is RegExMatch:
return rematch.get_string()
else:
return null
Godot version: Godot 4.0 beta 10
addon version: godot 4 branch 3b61520
running the project will result an error in IntType.gd Line 12
The text was updated successfully, but these errors were encountered: