Skip to content

lute check needs to support the new Luau type solver #710

@Vighnesh-V

Description

@Vighnesh-V

Currently, lute check defaults to the old solver under the hood. We should force this on by default.

To test that the new solver is being used:

function add(a,b)
    return a + b
end

local vec2 = {}

function vec2.new(x, y)
    return setmetatable({x = x or 0, y = y or 0}, {__add = function(v1, v2) return {x = v1.x + v2.x, y = v1.y + v2.y} end})
end

add(1,1)
add(vec2.new(0, 0), vec2.new(1,1))

This should typecheck with no errors - the old luau solver will raise an error in the add function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliThe lute command-line interfacegood first issueGood for newcomers

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions