Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Remove the _AlwaysSelectable const constructor since it is always sto…
Browse files Browse the repository at this point in the history
…red as a Selectable<T> and the generic type isn't available as a const.

Fix run time type error exposed by dart2js when compiling with Dart2 semantics.

Does not yet appear in DDC because of a known issue.
dart-lang/sdk#32918

PiperOrigin-RevId: 197071245
  • Loading branch information
nshahan committed May 18, 2018
1 parent 10f69a7 commit 177f996
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/src/material_tree/material_tree_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class MaterialTreeNode<T> {
if (_root.options is Selectable) {
_selectable = _root.options as Selectable<T>;
} else {
_selectable = const _AlwaysSelectable();
_selectable = new _AlwaysSelectable<T>();
}
}

Expand Down Expand Up @@ -284,8 +284,6 @@ class MaterialTreeNode<T> {

// TODO(google): Remove once we switch over Selectable interfaces.
class _AlwaysSelectable<T> implements Selectable<T> {
const _AlwaysSelectable();

@override
SelectableOption getSelectable(T item) => SelectableOption.Selectable;
}
Expand Down

0 comments on commit 177f996

Please sign in to comment.