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

Unified Diff: tests/compiler/dart2js/generic_method_type_usage_test.dart

Issue 2541473002: Handle 'dynamic' as type argument in generic calls. (Closed)
Patch Set: Created 4 years, 1 month 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 | « pkg/compiler/lib/src/parser/parser.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/generic_method_type_usage_test.dart
diff --git a/tests/compiler/dart2js/generic_method_type_usage_test.dart b/tests/compiler/dart2js/generic_method_type_usage_test.dart
index b1f0f222262d2cd91bf6b83bc3d3b9ca910f4040..bbaae7824d22d1809b4e3225f97603ec9fd6a04c 100644
--- a/tests/compiler/dart2js/generic_method_type_usage_test.dart
+++ b/tests/compiler/dart2js/generic_method_type_usage_test.dart
@@ -69,6 +69,13 @@ main() {
aFunction<Set>();
}
''',
+
+ 'dynamic_as_type_argument.dart': '''
+main() {
+ method<dynamic>();
+}
+method<T>() {}
+''',
};
Future runTest(Uri main, {MessageKind warning, MessageKind info}) async {
@@ -84,7 +91,7 @@ Future runTest(Uri main, {MessageKind warning, MessageKind info}) async {
outputProvider: output);
Expect.isFalse(output.hasExtraOutput);
- Expect.equals(0, diagnostics.errors.length);
+ Expect.equals(0, diagnostics.errors.length, "Unexpected errors.");
Expect.equals(warning != null ? 1 : 0, diagnostics.warnings.length);
if (warning != null) {
Expect.equals(warning, diagnostics.warnings.first.message.kind);
@@ -105,5 +112,7 @@ void main() {
await runTest(Uri.parse('memory:cannot_new_function_type_variable.dart'),
warning: MessageKind.CANNOT_INSTANTIATE_TYPE_VARIABLE);
+
+ await runTest(Uri.parse('memory:dynamic_as_type_argument.dart'));
});
}
« no previous file with comments | « pkg/compiler/lib/src/parser/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698