You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -62,15 +62,16 @@ Modify `lib.data.View.eq(other)` to add the following checks:
62
62
- Otherwise, proceed as normal.
63
63
64
64
Modify `lib.enum.EnumView.eq(other)` to add the following checks:
65
-
- If `other` is an `EnumView`, reject the assignment if enum types are not identical.
66
-
- Otherwise, if `other` is another `ValueCastable`, reject the assignment.
65
+
- If `other` is a `ValueCastable`, reject the assignment if `other.shape()` doesn't match `self.shape()`.
67
66
- Otherwise, proceed as normal.
68
67
69
68
Rejected assignments are a warning in Amaranth 0.6 and becomes a hard error in Amaranth 0.7.
70
69
71
70
## Drawbacks
72
71
[drawbacks]: #drawbacks
73
72
73
+
- Increased language complexity.
74
+
74
75
- This will add an implied requirement for a `ValueCastable` to implement `.eq()` to be usable with `lib.wiring`. Currently a `ValueCastable` is not required to implement `.eq()` at all.
75
76
- We could fall back to `Value.cast().eq()` when `.eq()` is not defined.
76
77
@@ -91,7 +92,7 @@ Rejected assignments are a warning in Amaranth 0.6 and becomes a hard error in A
0 commit comments