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

Unified Diff: dart/tests/compiler/dart2js_native/rti_only_native_test.dart

Issue 19693011: Fix some bugs regarding native fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove debug code and add a comment Created 7 years, 5 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
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/compiler/dart2js_native/rti_only_native_test.dart
diff --git a/dart/tests/compiler/dart2js_native/rti_only_native_test.dart b/dart/tests/compiler/dart2js_native/rti_only_native_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..634f7522701e8f3288eb60cc1f0ddc6d6581bfa6
--- /dev/null
+++ b/dart/tests/compiler/dart2js_native/rti_only_native_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2013, 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.
+
+// Regression test for a bug that was caused by uninstantiated classes being
+// added to emitted classes by runtime-type system.
+// See my explanation in https://codereview.chromium.org/14018036/.
+// -- ahe
+
+class A native "A" {
+ // Just making sure the field name is unique.
+ var rti_only_native_test_field;
+}
+
+typedef fisk();
+
+main() {
+ void foo(A x) {}
+ var map = { 'a': 0, 'b': main };
+ try {
+ map.values.forEach((x) => x.rti_only_native_test_field);
+ } finally {
+ print(main is fisk);
+ return;
+ }
+}
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698