Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Unified Diff: sky/sdk/lib/widgets/widget.dart

Issue 1182323009: Zero warnings from the analyzer! (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/widgets/ink_well.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/widget.dart
diff --git a/sky/sdk/lib/widgets/widget.dart b/sky/sdk/lib/widgets/widget.dart
index 0773cd5ec13177dc58e4ba02853e0179857abaed..9b4001eff9292b7c84cd71edd81242dc4b024860 100644
--- a/sky/sdk/lib/widgets/widget.dart
+++ b/sky/sdk/lib/widgets/widget.dart
@@ -109,11 +109,11 @@ abstract class Widget {
// Returns the child which should be retained as the child of this node.
Widget syncChild(Widget node, Widget oldNode, dynamic slot) {
- assert(oldNode is! Component || !oldNode._disqualifiedFromEverAppearingAgain);
+ assert(oldNode is! Component || (oldNode is Component && !oldNode._disqualifiedFromEverAppearingAgain)); // TODO(ianh): Simplify this once the analyzer is cleverer
if (node == oldNode) {
assert(node == null || node.mounted);
- assert(node is! RenderObjectWrapper || node._ancestor != null);
+ assert(node is! RenderObjectWrapper || (node is RenderObjectWrapper && node._ancestor != null)); // TODO(ianh): Simplify this once the analyzer is cleverer
return node; // Nothing to do. Subtrees must be identical.
}
@@ -495,7 +495,7 @@ abstract class RenderObjectWrapper extends Widget {
void insertChildRoot(RenderObjectWrapper child, dynamic slot);
void detachChildRoot(RenderObjectWrapper child);
- void _sync(Widget old, dynamic slot) {
+ void _sync(RenderObjectWrapper old, dynamic slot) {
// TODO(abarth): We should split RenderObjectWrapper into two pieces so that
// RenderViewObject doesn't need to inherit all this code it
// doesn't need.
« no previous file with comments | « sky/sdk/lib/widgets/ink_well.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698