sway
sway copied to clipboard
Move the `resolve_types` function to the `TypeEngine`
Resolving types is the work of the type engine so this PR moves it from Root to TypeEngine.
How about something simple like get_typeinfo or get_resolved_typeinfo? The main thing this method does is convert a TypeId into a TypeInfo... the fact that it returns a Result tells us that it can fail.
Oh, true, I thought it was returning the same thing and just rejecting unkowns, I didn't notice the conversion.
I renamed it to to_typeinfo... let me know if that feels better!