Property Type Can't Wrap Implicitly Convertible Classes
(FYI I have a fix, but I want to associate an issue with this bug so I have a name for the regression test)
The issue was that if a property type expected an input of value type `A`, but was given an object of value type `B` (`B` is such that it is implicitly convertible to an `A`) you would get a runtime error about the `B` object failing the bounds check of having type `A`. The template meta-programming on the front-end correctly identified that `B` could be converted to an `A`, but when `B` gets type-erased it's type-erased as a `B`.
The fix is simply to make sure that the `B` object gets type-erased as an `A`.
关闭于 2024-05-16 0 条评论