luau icon indicating copy to clipboard operation
luau copied to clipboard

[New solver --!strict] blocked type when using table.isfrozen on a generic refined to table

Open imnerolin opened this issue 1 year ago • 0 comments

local function freeze <T>(v: T): T
	if type(v) ~= "table" then
		return v
	end

        -- typeof(v) is T & table
	
	if not table.isfrozen(v) then -- Operator 'not' could not be applied to type *blocked-xxxxx*
		table.freeze(v)
	end
	
	return v
end

im only really reporting this because its a blocked type so that definitely means some bug happened somewhere i saw this when going over script analysis in my place

imnerolin avatar Dec 22 '24 15:12 imnerolin