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

Unified Diff: sdk/lib/_internal/compiler/implementation/tree_validator.dart

Issue 422483002: Mix in [TreeElementMixin] only on nodes that need it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 4 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
Index: sdk/lib/_internal/compiler/implementation/tree_validator.dart
diff --git a/sdk/lib/_internal/compiler/implementation/tree_validator.dart b/sdk/lib/_internal/compiler/implementation/tree_validator.dart
index 399ad60ed6ea70ac4bca52bdfcc74b36ce7b46aa..e3dfcc9aec098c39e6d97957c192b29bf97c6297 100644
--- a/sdk/lib/_internal/compiler/implementation/tree_validator.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree_validator.dart
@@ -58,7 +58,7 @@ class ValidatorVisitor extends Visitor {
}
visitReturn(Return node) {
- if (!node.isRedirectingFactoryBody && node.hasExpression) {
+ if (node.hasExpression) {
// We allow non-expression expressions in Return nodes, but only when
// using them to hold redirecting factory constructors.
expect(node, node.expression.asExpression() != null);

Powered by Google App Engine
This is Rietveld 408576698