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
Describe the bug
I have a variable "v" of type "Vector". When I use the method "normalized" on the Vector, the extension doesn't detect the return value properly.
Interesting… I was unable to replicate initially, but after reloading VS Code, I did start seeing that print(v.x) was reporting v as you showed in your second image. I was able to work around this though by marking v = v:normalized() as local:
This appears to be something acting up when reassigning a local variable. There are a few other ways to do this that can avoid this problem, depending on your situation:
Describe the bug
I have a variable "v" of type "Vector". When I use the method "normalized" on the Vector, the extension doesn't detect the return value properly.
Here is the code:
Before v:normalized, v is detected properly:

But after the assignment to the method result, v isn't recognized anymore (however, the description of the class is still there...):

The weird thing about this bug is that when using a temporary variable, "v" is detected properly:
Result:

To reproduce
This bug doesn't happen everytime, but reloading and/or copying the code triggers it again.
Expected behavior
v should always be detected as a Vector, even after v:normalized(), since this method returns a Vector.
Environment:
The text was updated successfully, but these errors were encountered: