Anaminus / rbxmk

A tool for processing Roblox files.
MIT License
109 stars 11 forks source link

Do something about convertType #30

Closed Anaminus closed 3 years ago

Anaminus commented 4 years ago

convertType is used when setting a property while an instance has a descriptor, to validate the type, and attempt to convert the underlying value to the property descriptor's value type. Most of the time, Value.Type() is matched, and the value is validated just fine. However, it also contains a bunch of hard-coded switch cases for converting all the various exprims to the expected type. It would be better if this were spread out as an option to each type's reflector.