Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW SOLVER: table.freeze() issues; TypeError when freezing a table with a metatable, and missing first argument crashes the solver #1498

Open
imnerolin opened this issue Oct 29, 2024 · 2 comments
Assignees
Labels
bug Something isn't working new solver This issue is specific to the new solver.

Comments

@imnerolin
Copy link

local meta = {
	__index = function()
		return "foo"
	end
}

local myTable = setmetatable({}, meta)
table.freeze(myTable)
--[=[
	table.freeze( ** myTable) **
	TypeError: Type 'myTable' could not be converted into 'table'
]=]

also: table.freeze with a missing first argument crashes the entire solver

local myTable = setmetatable({}, meta)
-- if you were trying to type table.freeze(meta)
-- then the entire solver would crash, forcing you to
-- restart whatever you're coding on
table.freeze() -- Crash!
@imnerolin imnerolin added the bug Something isn't working label Oct 29, 2024
@imnerolin
Copy link
Author

seems to be an issue with the luau language server plugin on VS code, this doesn't occur in roblox studio or neovim

@imnerolin imnerolin closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2024
@aatxe
Copy link
Collaborator

aatxe commented Oct 30, 2024

Neither of these are specific to luau-lsp, the relevant flag is just not on in Roblox Studio yet. It is a valid issue.

@aatxe aatxe added the new solver This issue is specific to the new solver. label Oct 30, 2024
@aatxe aatxe self-assigned this Oct 30, 2024
@aatxe aatxe reopened this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new solver This issue is specific to the new solver.
Development

No branches or pull requests

2 participants