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

Unified Diff: tests/language/cyclic_type_test.dart

Issue 897013003: dart2js: add common names to mangledGlobalNames in new emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comment. Created 5 years, 10 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/cyclic_type_test.dart
diff --git a/tests/language/cyclic_type_test.dart b/tests/language/cyclic_type_test.dart
index 4de75d947c24dd9de6d51d4204f690254784f204..ed591fcf220eeced0b4463baece37edf7b43b89b 100644
--- a/tests/language/cyclic_type_test.dart
+++ b/tests/language/cyclic_type_test.dart
@@ -28,6 +28,11 @@ class Derived1<U> extends Base<Derived2<U>> {} /// 04: ok
class Derived2<V> extends Base<Derived1<Derived2<V>>> {} /// 04: ok
main() {
+ // In the tests below we test that we get "int" and "bool" when calling
+ // toString() on the int and bool type respectively. This is not required
+ // behavior. However, we want to keep the original names for the most common
+ // core types so we make sure to handle these specifically in the compiler.
+
var d;
d = new Derived(); /// 00: continued
Expect.equals("Derived", d.t.toString()); /// 00: continued
@@ -37,6 +42,7 @@ main() {
Expect.equals("Derived<Derived>", d.t.toString()); /// 00: continued
d = new Derived(); /// 01: continued
+
Expect.equals("Derived<Derived<int>>", d.t.toString()); /// 01: continued
d = new Derived<bool>(); /// 01: continued
Expect.equals("Derived<Derived<int>>", d.t.toString()); /// 01: continued
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart ('k') | tests/language/f_bounded_quantification5_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698