Skip to content

(New solver) Generic parameters unioned with a literal infer to unknown if a literal is passed in #2010

@ffrostfall

Description

@ffrostfall

Reproduction:

local function foo<T>(my_enum: "" | T): T
	return my_enum
end

local var = foo("meow") -- var is unknown here, should be "meow"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnew solverThis issue is specific to the new solver.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions