Repository navigation
Vector types spec - #1195
Vector types spec#1195Kronos3 wants to merge 6 commits into
Conversation
|
After review with @bocchino, the following actions have been raised:
|
| stem:[T_2] | ||
| and stem:[T_2] may be converted to stem:[T_3], then stem:[T_1] | ||
| may be converted to stem:[T_3]. | ||
| The one exception is that a |
There was a problem hiding this comment.
We can't have an exception to transitivity here. Let's discuss the motivation for this and address the underlying cause. I expect it's a workaround for a defect elsewhere in the rules.
There was a problem hiding this comment.
Let's remove the exception to transitivity. Convert V to [V]
| array type stem:[T_2] if stem:[T_1] may be converted to the member type of | ||
| stem:[T_2]. | ||
|
|
||
| . An anonymous array type stem:[T_1 =] _[_ stem:[n] _]_ stem:[T'_1] |
There was a problem hiding this comment.
I think these conversion rules are too permissive, because with transitivity, you can use them to convert [n] T to [m] T for any n and m, by going through a vector of T.
There was a problem hiding this comment.
Do we ever need to convert a vector type to an anonymous array type? If not, we could disallow that conversion.
There was a problem hiding this comment.
We decided we should disallow this
Spec for #1057
There is some overlap with the spec work done for range-types having to do with "fallible" value conversion after type checking passes. I've synced up with the latest spec we merged into
feature/range-typeswhich should make the inevitable merge conflict less painful.