Instance types returned from type functions are incompatible with their actual type, despite being identical

As of version 0.662, instance types that are passed through and returned from a type function are not compatible with the types themselves, throwing the type error “type ‘<x>’ from ‘Roblox’ could not be converted to ‘<x>’ from ‘DataModel’” for seemingly identical types.
This may be related to the github issue here: [New Solver] Roblox Instance types lose their child members when passed through a type function · Issue #1639 · luau-lang/luau · GitHub

--!strict
type function func(t)
	return t
end
local i:Model = Instance.new('Model')
--Type 'Model' from 'Roblox' could not be converted into 'Model' from 'DataModel'
local _:func<Model> = i

Expected behavior

The types are identical and therefore compatible with eachother.

1 Like

Thank you for the report.

As you can see from the issue you have linked, we have a fix for this prepared.

We have released a fix that should address this.

Please check again if you still have an error as we couldn’t see an issue with your particular example even before the fix.
We know that there was a problem similar to this, it just didn’t show up in this case.

strangely the issue just… vanished?? i suspected i forgot about DFIntLuauTypeSolverRelease but either way it’s a hell of a lot better than it being broken at all