vlang / intellij-v

MIT License
33 stars 5 forks source link

Incorrect variable type on hover #5

Closed JalonSolov closed 2 months ago

JalonSolov commented 5 months ago

Describe the bug

The plugin is not correctly identifying the type of a variable.

Expected Behavior

In example code, start should be recognized as type time.Time (vscode with vlang plugin does) when mouse is hovered over variable.

Current Behavior

start is shown as type any, not time.Time

Reproduction Steps

Enter this into the editor:

import time

fn main() {
    start := time.now()
}

then hover the mouse over the start variable. It is identified as var start any.

Possible Solution

No response

Additional Information/Context

No response

Environment details (v doctor output)

V full version: V 0.4.6 efa98d9.37f385c
OS: linux, "Manjaro Linux"
Processor: 32 cpus, 64bit, little endian, AMD Ryzen 9 7950X 16-Core Processor

getwd: /home/jalon/git/intellij-v
vexe: /home/jalon/git/v/v
vexe mtime: 2024-05-26 18:57:55

vroot: OK, value: /home/jalon/git/v
VMODULES: OK, value: /home/jalon/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.45.0
Git vroot status: 0.4.6-43-g37f385c9
.git/config present: true

CC version: cc (GCC) 13.2.1 20240417
thirdparty/tcc status: thirdparty-linux-amd64 40e5cbb5

IDE Type (IDEA Community/Ultimate, GoLand, CLion, etc.)

IDEA Ultimate, 241.17011.79

Plugin Version

Vlang-0.0.1-beta.5 (built from Krotki's update_libs_with_coroutines branch)

Krotki commented 2 months ago

This should be fixed in version 0.0.1-beta.6.

A reason of this error was lack of support for static functions which lead to wrongly indexing functions.

JalonSolov commented 2 months ago

You were correct. This is fixed in 0.0.1-beta.6