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

Side by Side Diff: pkg/dev_compiler/lib/src/compiler/js_metalet.dart

Issue 2803673007: fix #29233, final fields can be settable in a mock (Closed)
Patch Set: fix Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // TODO(jmesserly): import from its own package 5 // TODO(jmesserly): import from its own package
6 import '../js_ast/js_ast.dart'; 6 import '../js_ast/js_ast.dart';
7 import '../js_ast/precedence.dart';
8 7
9 import 'js_names.dart' show TemporaryId; 8 import 'js_names.dart' show TemporaryId;
10 9
11 /// A synthetic `let*` node, similar to that found in Scheme. 10 /// A synthetic `let*` node, similar to that found in Scheme.
12 /// 11 ///
13 /// For example, postfix increment can be desugared as: 12 /// For example, postfix increment can be desugared as:
14 /// 13 ///
15 /// // psuedocode mix of Scheme and JS: 14 /// // psuedocode mix of Scheme and JS:
16 /// (let* (x1=expr1, x2=expr2, t=x1[x2]) { x1[x2] = t + 1; t }) 15 /// (let* (x1=expr1, x2=expr2, t=x1[x2]) { x1[x2] = t + 1; t })
17 /// 16 ///
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 if (!_nestedFunction) hasYield = true; 351 if (!_nestedFunction) hasYield = true;
353 super.visitYield(node); 352 super.visitYield(node);
354 } 353 }
355 354
356 @override 355 @override
357 visitNode(Node node) { 356 visitNode(Node node) {
358 if (hasYield && hasThis) return; // found both, nothing more to do. 357 if (hasYield && hasThis) return; // found both, nothing more to do.
359 super.visitNode(node); 358 super.visitNode(node);
360 } 359 }
361 } 360 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698