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

Unified Diff: tests/language/private1.dart

Issue 10830331: Fix wrong optimization for private fields (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: tests/language/private1.dart
diff --git a/tests/language/private1.dart b/tests/language/private1.dart
index 6841cda70451e285a42b4dfacb5508806917210c..519658ce22159518c02c8c502041b8cffc7f412b 100644
--- a/tests/language/private1.dart
+++ b/tests/language/private1.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -62,6 +62,9 @@ class C3 extends C2 {
int c_field1a(c) => c._field1;
int c_field2a(c) => c._field2;
+int _field1FromNewC4() => new C4()._field1;
+int _field2FromNewC4() => new C4()._field2;
+
void testPrivateClasses() {
_A a = new _A();
Expect.equals(499, a.fieldA);
@@ -87,4 +90,6 @@ void testPrivateClasses() {
Expect.equals(1024, c.field2b());
Expect.equals(499, c.field1c());
Expect.equals(99, c.field1d());
+ Expect.equals(499, _field1FromNewC4());
+ Expect.equals(42, _field2FromNewC4());
}

Powered by Google App Engine
This is Rietveld 408576698