Skip to content

Unknown type when dividing two numbers (2) #2236

Description

@RomanSpector

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Type Checking

Expected Behaviour

image

Actual Behaviour

image

image

image

Reproduction steps

localcount=0;
localtime=0;
localallcount=0;
localalltime=0;
localavg=0;
---@typeinteger[]localallstats= {}
fori, valueinipairs(allstats) docount=count+1;
time=time+1;
allcount=allcount+1;
alltime=alltime+1;
endifallcount>0thenavg=alltime/allcount;
end

Additional Notes

Previous fix: #2036

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeat/type checkRelated to the type checking feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions