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

Side by Side 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: Suppress empty arg with dynamic params 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Regression test for issue 11891. 5 // Test the use type arguments on constant maps.
6
7 library map_literal11_test;
6 8
7 import "package:expect/expect.dart"; 9 import "package:expect/expect.dart";
8 import "mixin_prefix_lib.dart";
9 10
10 class A extends Object with MixinClass { 11 void foo(Map m) {
11 String baz() => bar(); 12 Expect.throws(() { m[23] = 23; }, (e) => e is TypeError);
12 } 13 }
13 14
14 void main() { 15 void main() {
15 var a = new A(); 16 Map<String, dynamic> map = {};
16 Expect.equals('{"a":1}', a.baz()); 17 foo(map);
17 } 18 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698