Skip to content

Commit 6e0d5a6

Browse files
committed
RFC #73: Final touches.
1 parent d660bfc commit 6e0d5a6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

text/0073-stricter-connections.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
- Start Date: (fill in with date at which the RFC is merged, YYYY-MM-DD)
1+
- Start Date: 2024-09-16
22
- RFC PR: [amaranth-lang/rfcs#73](https://github.com/amaranth-lang/rfcs/pull/73)
3-
- Amaranth Issue: [amaranth-lang/amaranth#0000](https://github.com/amaranth-lang/amaranth/issues/0000)
3+
- Amaranth Issue: [amaranth-lang/amaranth#1511](https://github.com/amaranth-lang/amaranth/issues/1511)
44

55
# Stricter connections
66

@@ -62,15 +62,16 @@ Modify `lib.data.View.eq(other)` to add the following checks:
6262
- Otherwise, proceed as normal.
6363

6464
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()`.
6766
- Otherwise, proceed as normal.
6867

6968
Rejected assignments are a warning in Amaranth 0.6 and becomes a hard error in Amaranth 0.7.
7069

7170
## Drawbacks
7271
[drawbacks]: #drawbacks
7372

73+
- Increased language complexity.
74+
7475
- 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.
7576
- We could fall back to `Value.cast().eq()` when `.eq()` is not defined.
7677

@@ -91,7 +92,7 @@ Rejected assignments are a warning in Amaranth 0.6 and becomes a hard error in A
9192
## Unresolved questions
9293
[unresolved-questions]: #unresolved-questions
9394

94-
None (yet).
95+
None.
9596

9697
## Future possibilities
9798
[future-possibilities]: #future-possibilities

0 commit comments

Comments
 (0)