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

Unified Diff: tests/compiler/dart2js_extra/17856_test.dart

Issue 212693003: Fix handling of union on DictionaryTypeMask. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: smaller patch that only fixes issue Created 6 years, 9 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 | « sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_extra/17856_test.dart
diff --git a/tests/compiler/dart2js_extra/17856_test.dart b/tests/compiler/dart2js_extra/17856_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1e6fa63cd96b53bb46e9860d069d6659ebf0fd99
--- /dev/null
+++ b/tests/compiler/dart2js_extra/17856_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2014, 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.
+
+import "package:expect/expect.dart";
+
+// Regression test for Issue 17856.
+
+void main() {
+ var all = { "a": new A(), "b": new B() };
+
+ A a = all["a"];
+ a.load();
+}
+
+class A {
+ Loader _loader = new Loader();
+
+ load() => _loader.loadAll({
+ 'a1': {}
+ });
+}
+
+class B {
+ Loader _loader = new Loader();
+
+ load() => _loader.loadAll({
+ 'a2': new DateTime.now(),
+ });
+}
+
+class Loader {
+ loadAll(Map assets) {
+ for(String key in assets.keys) {
+ Expect.isTrue(assets[key] is Map);
+ }
+ }
+}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698