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

Commit fe7be8d

Browse files
committed
Fix runtime type error
This is blocking the Dart SDK roll. We have fixed a bug in analyzer where the type parameters in const expressions were not being properly enforced as Null. Now the use here is invalid because you can't call `hasChildren()` with any value. PiperOrigin-RevId: 242756171
1 parent 75cf43b commit fe7be8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

angular_components/lib/src/material_tree/material_tree_node.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class MaterialTreeNode<T> {
4444
_group = _EMPTY_OPTION_GROUP;
4545
if (!_root.supportsHierarchy) {
4646
_isExpandable = (_) => false;
47-
_parent = const _NotAParent();
47+
_parent = _NotAParent();
4848
} else {
4949
_isExpandable = isExpandable ?? hasChildren;
5050
_parent = _root.options as Parent<T, Iterable<OptionGroup<T>>>;
@@ -292,7 +292,7 @@ class _AlwaysSelectable<T> implements Selectable<T> {
292292
}
293293

294294
class _NotAParent<P, C> implements Parent<P, C> {
295-
const _NotAParent();
295+
_NotAParent();
296296

297297
@override
298298
bool hasChildren(P item) => false;

0 commit comments

Comments
 (0)