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

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

Issue 10827359: Fix field-accesses for private fields that were "shadowed" by other private fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update comments. Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/world.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Dart test for testing access to private fields. 5 // Dart test for testing access to private fields.
6 6
7 main() { 7 main() {
8 testPrivateTopLevel(); 8 testPrivateTopLevel();
9 testPrivateClasses(); 9 testPrivateClasses();
10 } 10 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 var a2 = new AImported(); 74 var a2 = new AImported();
75 Expect.equals(499, a2.getFieldA()); 75 Expect.equals(499, a2.getFieldA());
76 76
77 B b = new B(); 77 B b = new B();
78 Expect.equals(42, b._fieldB); 78 Expect.equals(42, b._fieldB);
79 Expect.equals(42, accessFieldB2(b)); 79 Expect.equals(42, accessFieldB2(b));
80 expectCatch(() => LibOther3.accessFieldB3(b)); 80 expectCatch(() => LibOther3.accessFieldB3(b));
81 81
82 C4 c = new C4(); 82 C4 c = new C4();
83 Expect.equals(499, c._field1);
83 Expect.equals(499, c_field1a(c)); 84 Expect.equals(499, c_field1a(c));
84 Expect.equals(499, c.field1a()); 85 Expect.equals(499, c.field1a());
86 Expect.equals(42, c._field2);
85 Expect.equals(42, c_field2a(c)); 87 Expect.equals(42, c_field2a(c));
86 Expect.equals(42, c.field2a()); 88 Expect.equals(42, c.field2a());
87 Expect.equals(99, LibOther3.c_field1b(c)); 89 Expect.equals(99, LibOther3.c_field1b(c));
88 Expect.equals(99, c.field1b()); 90 Expect.equals(99, c.field1b());
89 Expect.equals(1024, LibOther3.c_field2b(c)); 91 Expect.equals(1024, LibOther3.c_field2b(c));
90 Expect.equals(1024, c.field2b()); 92 Expect.equals(1024, c.field2b());
91 Expect.equals(499, c.field1c()); 93 Expect.equals(499, c.field1c());
92 Expect.equals(99, c.field1d()); 94 Expect.equals(99, c.field1d());
93 Expect.equals(499, _field1FromNewC4()); 95 Expect.equals(499, _field1FromNewC4());
94 Expect.equals(42, _field2FromNewC4()); 96 Expect.equals(42, _field2FromNewC4());
95 } 97 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/world.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698