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.