Discussion:
[dart-misc] [dart-announce] Fair warning: Some Stream methods now return streams with the type parameter they are supposed to have.
'Lasse R.H. Nielsen' via Dart Announcements
2015-08-12 08:42:04 UTC
Permalink
We have found some cases where stream methods declared as returning
Stream<T> was just returning Stream<dynamic>.
Those have been fixed in release 1.12:
https://github.com/dart-lang/sdk/commit/ac33dfe1946f2a36e3ec7863d8c1da113f3118cf

If you have code that optimistically assumes the returned value is actually
Stream<dynamic>, then this change may break that code.
The most likely case would be a cast like:
Stream<int> intStream = numberStream.where((x) => x is int);
(but not exactly like it, because "where" did not need to be changed).

/L
--
Lasse R.H. Nielsen - ***@google.com
'Faith without judgement merely degrades the spirit divine'
Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 KÞbenhavn K
- Denmark - CVR nr. 28 86 69 84
--
For more news and information, visit https://plus.google.com/+dartlang

To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Kevin Moore
2015-08-31 16:12:02 UTC
Permalink
FYI: you're more likely to see issues when running in checked mode.

On Wednesday, August 12, 2015 at 9:42:25 AM UTC+1, Lasse Reichstein Holst
Post by 'Lasse R.H. Nielsen' via Dart Announcements
We have found some cases where stream methods declared as returning
Stream<T> was just returning Stream<dynamic>.
https://github.com/dart-lang/sdk/commit/ac33dfe1946f2a36e3ec7863d8c1da113f3118cf
If you have code that optimistically assumes the returned value is actually
Stream<dynamic>, then this change may break that code.
Stream<int> intStream = numberStream.where((x) => x is int);
(but not exactly like it, because "where" did not need to be changed).
/L
--
'Faith without judgement merely degrades the spirit divine'
Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 KÞbenhavn K
- Denmark - CVR nr. 28 86 69 84
--
For more news and information, visit https://plus.google.com/+dartlang

To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Continue reading on narkive:
Search results for '[dart-misc] [dart-announce] Fair warning: Some Stream methods now return streams with the type parameter they are supposed to have.' (Questions and Answers)
276
replies
What do you think we should do to reduce shark attacks in Australian waters?
started 2009-03-01 15:29:08 UTC
current events
Loading...