Allow polymorphic methods in refinements when used as an upper bound #17705
s5bug
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider the following:
The existence of a contract-abiding
map
method seems to be guaranteed at compile-time.@Adam-Vandervorst is working on a
macroloop
project which uses macros to vastly improve the performance of certain collections operations, and such restrictions allow for an easy way to verify that a generated for-comprehension would be valid:Note that determining whether a subtyping is valid doesn't require reflection:
So my thoughts are that, once we've determined that the subtyping is valid, we should know that the reflective call is valid, right?
Beta Was this translation helpful? Give feedback.
All reactions