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

Unified Diff: sky/sdk/lib/rendering/auto_layout.dart

Issue 1234093002: Silence analyzer by explicitly casting the parent to the class we know it is. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/auto_layout.dart
diff --git a/sky/sdk/lib/rendering/auto_layout.dart b/sky/sdk/lib/rendering/auto_layout.dart
index d3c8d10b1e448cbb5eb656fe57687a4bcc574c79..1942760016d3768dd2ed11491806aa23ee8ea39b 100644
--- a/sky/sdk/lib/rendering/auto_layout.dart
+++ b/sky/sdk/lib/rendering/auto_layout.dart
@@ -102,7 +102,8 @@ class AutoLayoutParentData extends BoxParentData
// This is called by the parent's layout function
// to lay our box out.
assert(_renderBox.parentData == this);
- assert(_renderBox.parent.debugDoingThisLayout);
+ assert(_renderBox.parent is RenderAutoLayout);
+ assert((_renderBox.parent as RenderAutoLayout).debugDoingThisLayout); // TODO(ianh): Remove cast once the analyzer is cleverer
BoxConstraints size = new BoxConstraints.tightFor(
width: _rightEdge.value - _leftEdge.value,
height: _bottomEdge.value - _topEdge.value
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698