Generics in new solver


image

Is it okey that solver in --strict! mode can’t understand that it needs to give a warning here?..
Old solver throws a warning as supposed.

but it gets it right

T is the union Part|number|string

Sadly, this is intended and 100% correct.

As much as I despise it, I agree with the type solver here!

lumizk is correct—T does refer to the union of Part | number | string. Until Luau supports generics that aren’t just a fancy way of writing any, this is sadly out of easy control.

How are you working with this complicated stuff, yet posting pictures vs scripts here.
Please use the </> option.. I’m way to lazy to type out scripts looking at a picture to test with.. :face_with_crossed_out_eyes:

sorry about it )

aaaaaaaaaaaaa

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.