Closed DartBot closed 9 years ago
Comment by seaneagan
Actually, Stream is easy enough, you just have to delegate in [Stream.listen].
As far as the Sinks go, my actual use case turns out to be to extend Stdin and IOSink. I'm creating a library to allow mocking out io stuff, including stdin, stdout, stderr. I can't extend IOSink or Stdin since they only have factory constructors which delegate to private concrete subclasses. This means I have to copy the implementations of _IOSinkImpl, _StreamSinkImpl, and Stdin.readLineSync, into my library. So my actual request is to make these classes subclassable. I can create a separate bug if that would be better.
This was fixed in 8d5716a22540bb8e790c3999fded524ac7693f88.
Issue by seaneagan Originally opened as dart-lang/sdk#21540
Delegating{List,Map,Set,Iterable} from package:collection are quite useful.
I often need to delegate to Streams and sinks as well. Delegating{Stream,IOSink,EventSink,StreamSink} in package:async would make that much easier.