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

Unified Diff: test/codegen/language/map_literal11_test.dart

Issue 2211293002: Reify type params on map literals (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Remove unnecessary null check Created 4 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
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | test/codegen_expected/corelib/apply2_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/language/map_literal11_test.dart
diff --git a/test/codegen/language/mixin_prefix_test.dart b/test/codegen/language/map_literal11_test.dart
similarity index 57%
copy from test/codegen/language/mixin_prefix_test.dart
copy to test/codegen/language/map_literal11_test.dart
index eea64ce0154c2092163ce5fe4809e9a77bcbe7d3..753524f9afe7388b0bffdd73302ad6d83f8ff17d 100644
--- a/test/codegen/language/mixin_prefix_test.dart
+++ b/test/codegen/language/map_literal11_test.dart
@@ -2,16 +2,17 @@
// 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 issue 11891.
+// Test the use type arguments on constant maps.
+
+library map_literal11_test;
import "package:expect/expect.dart";
-import "mixin_prefix_lib.dart";
-class A extends Object with MixinClass {
- String baz() => bar();
+void foo(Map m) {
+ Expect.throws(() { m[23] = 23; }, (e) => e is TypeError);
}
void main() {
- var a = new A();
- Expect.equals('{"a":1}', a.baz());
-}
+ Map<String, dynamic> map = {};
+ foo(map);
+}
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | test/codegen_expected/corelib/apply2_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698