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
Issue
v-analyzer is unable to infer that mystr will be of type string. The compiler has no issue and the program does run correctly.
Note
removing the selective import results in the type being inferred correctly:
Expected Behavior
V-Analyzer should be able to infer a type that comes from a selective import
Current Behavior
No Error is raised and the program does run correctly, however the type of the result of the selective import function call is unknown. This means there is no auto complete.
Reproduction Steps
v init a new project
cd src
create a new dir - "somemodule"
inside "somemodule", create a file "mymodule.v"
mymodule.v - add a module declaration "module somemodule"
mymodule.v - create a public function (my_method) that returns some value
main.v - import your function via a selctive import - import somemodule { my_method }
call my_method and assign it to a value - the type of this value will not be inferred
Possible Solution
No response
Additional Information/Context
Folder Structure
somemodule.v
main.v
Environment details (v doctor output)
Editor name
VsCode
v-analyzer Version
0.0.5.ef4243a
VS Code Extension Version
0.0.2
The text was updated successfully, but these errors were encountered:
Describe the bug
Issue

v-analyzer is unable to infer that mystr will be of type string. The compiler has no issue and the program does run correctly.
Note

removing the selective import results in the type being inferred correctly:
Expected Behavior
V-Analyzer should be able to infer a type that comes from a selective import
Current Behavior
No Error is raised and the program does run correctly, however the type of the result of the selective import function call is unknown. This means there is no auto complete.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
Folder Structure

somemodule.v

main.v

Environment details (
v doctor
output)Editor name
VsCode
v-analyzer Version
0.0.5.ef4243a
VS Code Extension Version
0.0.2
The text was updated successfully, but these errors were encountered: