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
List is not a subclass of UnmodifiableListView, so we shouldn't be able to set a variable defined with type UnmodifiableListView to a List. When we try to set an UnmodifiableListView to a List, the dart analyzer should throw an error or warning.
E.g. this code is currently allowed and builds fine:
import 'dart:collection';
List<String> _list;
UnmodifiableListView<String> get publicList => _list; // should throw error; currently doesn't
The above should instead be written as:
import 'dart:collection';
List<String> _list;
List<String> get publicList => new UnmodifiableListView<String>(_list);
The text was updated successfully, but these errors were encountered:
List is not a subclass of UnmodifiableListView, so we shouldn't be able to set a variable defined with type UnmodifiableListView to a List. When we try to set an UnmodifiableListView to a List, the dart analyzer should throw an error or warning.
E.g. this code is currently allowed and builds fine:
The above should instead be written as:
The text was updated successfully, but these errors were encountered: