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

Side by Side Diff: tests/language/type_promotion_logical_and_test.dart

Issue 85633002: Handle parenthesized expression in type promotion. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix comments. Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Test type promotion of locals potentially mutated. 5 // Test type promotion of locals potentially mutated.
6 6
7 class A { 7 class A {
8 var a = true; 8 var a = true;
9 } 9 }
10 class B extends A { 10 class B extends A {
(...skipping 15 matching lines...) Expand all
26 void main() { 26 void main() {
27 A a = new E(); 27 A a = new E();
28 var b; 28 var b;
29 if (a is D && ((a = new D()) != null)) { 29 if (a is D && ((a = new D()) != null)) {
30 b = a.d; /// 01: static type warning 30 b = a.d; /// 01: static type warning
31 } 31 }
32 if (a is D && (b = a.d)) { 32 if (a is D && (b = a.d)) {
33 b = a.d; /// 02: static type warning 33 b = a.d; /// 02: static type warning
34 a = null; 34 a = null;
35 } 35 }
36 if ((((a) is D) && (b = (a).d))) {
37 b = a.d; /// 03: static type warning
38 a = null;
39 }
36 if (f(a = null) && a is D) { 40 if (f(a = null) && a is D) {
37 b = a.d; 41 b = a.d;
38 } 42 }
39 } 43 }
40 44
41 bool f(x) => true; 45 bool f(x) => true;
OLDNEW
« no previous file with comments | « tests/language/type_promotion_closure_test.dart ('k') | tests/language/type_promotion_parameter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698