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

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

Issue 2072223002: Enforce use of the forEachInstanceField ordering for constructed constants. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove tab Created 4 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 6
7 var result; 7 class A {
8 final a;
8 9
9 class A { 10 const A(this.a);
10 noSuchMethod(im) {
11 result = 42;
12 }
13 } 11 }
14 12
15 class B extends A { 13 class B extends A {
16 noSuchMethod(im) { 14 final b;
17 result = 87;
18 }
19 15
20 set foo(v) => super.foo = v; /// 01: static type warning 16 const B(a, this.b) : super(a);
21 } 17 }
22 18
23 main() { 19 @NoInline()
24 new B().foo = 0; /// 01: continued 20 foo() => const B(1, 2);
25 Expect.equals(42, result); /// 01: continued 21
22 @NoInline()
23 bar() => const B(2, 2);
24
25 void main() {
26 Expect.notEquals(foo(), bar());
27 Expect.notEquals(foo().a, bar().a);
28 Expect.equals(foo().b, bar().b);
26 } 29 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698