Godot 4.1.3: The variable type is being inferred from a Variant value
lleblanc42 opened this issue · comments
Luke LeBlanc commented
Godot version
v4.1.3.stable
Issue description
Recieved a parse error in the console upon importing the plugin into Godot 4.1.3 that reads, "The variable type is being inferred from a Variant value, so it will be typed as Variant". This happens on line 252 in wiggle_bone.gd. Basically Godot doesn't know how to type cast it. To fix, simply apply the type.
var h := max(0.0, k - abs(a - b))
to
var h: float = max(0.0, k - abs(a - b))
Steps to reproduce
Import the plugin into 4.1.3.
Simon Schoenenberger commented
Strangely, I couldn't reproduce this error in any Godot version. Though, I once got it too on another occasion. I'll push a new version which should prevent this in any case. Thanks!