[New solver] Generic detection changes to unknown

if i don’t use the connect function everything works fine

adding another fire adds to the type this is also correct and works better then the old type solver

but when i add the connect function instead of adding onto the type like fire does it replaces all the old types

and when using the connect function without setting the types it replaces the type to unknown

export type MyType<A... = ()> = {
	Fire:				(self: MyType<A...>, A...) -> (),
	Connect:			(self: MyType<A...>, func: (A...) -> ()) -> (),
}

local function New<A...>()
	return {} :: MyType<A...>
end

local value = New()
value:Fire("abc", 123)
value:Connect(function(a, b) end)

Expected behavior

i believe the connect function should work in the same way as fire.
it should add onto the type so it should have been number | string | boolean and number | string
and if its unknown it should stay as number | string and number

Hello! Sorry for the delay here. Some of these issues have been fixed, but others are probably not going to be fixed in the new solver:

export type MyType<A... = ()> = {
	Fire:				(self: MyType<A...>, A...) -> (),
	Connect:			(self: MyType<A...>, func: (A...) -> ()) -> (),
}

local function New<A...>()
	return {} :: MyType<A...>
end

local value = New()

value:Fire("abc")

value:Connect(function(a: boolean)
end)

… this snippet will probably always error in some respect. There’s no type that would work for A... that would allow for both string as an input type to Fire and as the type of the function passed to Connect. boolean would mean we’d error on Fire, string would mean we’d error on Connect, and boolean | string would also mean erroring on Connect.

That being said, for your example where the types are replaced to unknown:

… looks like we now do the right thing here and push the A... type into Connect’s argument.

Please let us know if you run into any more issues, and if you have questions about the above explanation.