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

Side by Side Diff: tests/language_2/generic_methods_dynamic_test.dart

Issue 3001803002: Migrate block 114 (and some of 113). (Closed)
Patch Set: Tweak app_jit status. Created 3 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 // Test that if the type of a parameter of a generic method is a type parameter, 5 // Test that if the type of a parameter of a generic method is a type parameter,
6 // the type of the passed argument is checked (01) at compile time 6 // the type of the passed argument is checked (01) at compile time
7 // if the receiver is given via an interface-type variable, and (02) at runtime 7 // if the receiver is given via an interface-type variable, and (02) at runtime
8 // if the receiver is dynamic. 8 // if the receiver is dynamic.
9 9
10 library generic_methods_dynamic_test; 10 library generic_methods_dynamic_test;
(...skipping 24 matching lines...) Expand all
35 Expect.equals(obj.foo<B>(b), b); //# 05: continued 35 Expect.equals(obj.foo<B>(b), b); //# 05: continued
36 36
37 dynamic x = c.bar<B>(<B>[new B()]); //# 05: continued 37 dynamic x = c.bar<B>(<B>[new B()]); //# 05: continued
38 Expect.isTrue(x is List<B>); //# 05: continued 38 Expect.isTrue(x is List<B>); //# 05: continued
39 Expect.equals(x.length, 1); //# 05: continued 39 Expect.equals(x.length, 1); //# 05: continued
40 40
41 dynamic y = obj.bar<B>(<B>[new B()]); //# 05: continued 41 dynamic y = obj.bar<B>(<B>[new B()]); //# 05: continued
42 Expect.isTrue(y is List<B>); //# 05: continued 42 Expect.isTrue(y is List<B>); //# 05: continued
43 Expect.equals(y.length, 1); //# 05: continued 43 Expect.equals(y.length, 1); //# 05: continued
44 } 44 }
OLDNEW
« no previous file with comments | « tests/language_2/generic_methods_closure_test.dart ('k') | tests/language_2/generic_methods_function_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698