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

table.freeze returns type {+ +} with new solver's strict mode #1272

Open
Ketasaja opened this issue May 27, 2024 · 1 comment
Open

table.freeze returns type {+ +} with new solver's strict mode #1272

Ketasaja opened this issue May 27, 2024 · 1 comment
Labels
bug Something isn't working new solver This issue is specific to the new solver.

Comments

@Ketasaja
Copy link
Contributor

Ketasaja commented May 27, 2024

Tested on 0.627 with no errors in non-strict mode.

--!strict
type k = {
	k: string,
}

function _(): k
	return table.freeze({
		k = "",
	}) -- TypeError: Type pack '{+  +}' could not be converted into 'k'; at [0], {+  +} is not a subtype of k
end
@Ketasaja Ketasaja added the bug Something isn't working label May 27, 2024
@alexmccord alexmccord added the new solver This issue is specific to the new solver. label May 28, 2024
@karl-police
Copy link
Contributor

Same is for table.clone()

local test: typeof(table.clone())

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

3 participants