sway icon indicating copy to clipboard operation
sway copied to clipboard

Move the `resolve_types` function to the `TypeEngine`

Open emilyaherbert opened this issue 3 years ago • 3 comments

Resolving types is the work of the type engine so this PR moves it from Root to TypeEngine.

emilyaherbert avatar Sep 22 '22 23:09 emilyaherbert

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.

mohammadfawaz avatar Sep 23 '22 02:09 mohammadfawaz

Oh, true, I thought it was returning the same thing and just rejecting unkowns, I didn't notice the conversion.

otrho avatar Sep 23 '22 02:09 otrho

I renamed it to to_typeinfo... let me know if that feels better!

emilyaherbert avatar Sep 23 '22 23:09 emilyaherbert