Open DartBot opened 9 years ago
Comment by jakemac53
Hmm, this is really weird. Is it possible for you to attach a repro of this?
Technically, StreamController.broadcast is a factory method and as such could return a null I believe (although this would be bad practice imo since factories and constructors appear identical in dart). However in reality it looks like it does not do that...
Originally opened as dart-lang/sdk#20536
This issue was originally filed by ir...@google.com
What steps will reproduce the problem?
The null object does not have a getter 'stream'.
NoSuchMethodError: method not found: 'stream' Receiver: null Arguments: []
STACKTRACE:
0 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
1 ChangeNotifier.changes (package:observe/src/change_notifier.dart:29:21)
For reference, line 24-30 from change_notifier.dart:
Stream<List<ChangeRecord>> get changes { if (_changes == null) { _changes = new StreamController.broadcast(sync: true, onListen: observed, onCancel: unobserved); } return _changes.stream; }
What is the expected output? What do you see instead? _changes should never be null, so no exception should be thrown.
What version of the product are you using? Dartium Version 37.0.2062.0 (287872) (64-bit)
On what operating system? Linux
What browser (if applicable)? Dartium Version 37.0.2062.0 (287872) (64-bit)
Please provide any additional information below.
C1