Skip to content

Commit

Permalink
Self-evaluate closure passed to assert()
Browse files Browse the repository at this point in the history
In Dart 2.0, only boolean values will be accepted by assert. Closures were previously accepted, but should simply self-evaluate now.

dart-lang/sdk#30326
  • Loading branch information
srawlins committed Jan 9, 2018
1 parent dee0e20 commit 86f6c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class Node {
node = node.parent;
assert(node != child); // indicates we are about to create a cycle
return true;
});
}());

_childrenNeedSorting = true;
_children.add(child);
Expand Down

0 comments on commit 86f6c4d

Please sign in to comment.