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
This PR makes some improvements related to generic types.
It adds public generic type vars so the documentation is rendered more
nicely and we get documentation on the type parameters.
It also extends the use of covariance for other classes or functions
that work like containers that don't change the underlying data, so they
can be used more flexibly.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,9 +173,11 @@
173
173
174
174
## Improvements
175
175
176
-
*`Receiver`: Use a covariant generic type, which allows the generic type to be broader than the actual type.
176
+
*`Receiver`, `merge`/`Merger`, `Error` and its derived classes now use a covariant generic type, which allows the generic type to be broader than the actual type.
177
177
178
-
*`Sender`: Use a contravariant generic type, which allows the generic type to be narrower than the required type.
178
+
*`Sender` now uses a contravariant generic type, which allows the generic type to be narrower than the required type.
179
+
180
+
*`ChannelError` is now generic, so when accessing the `channel` attribute, the type of the channel is preserved.
0 commit comments