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

Unified Diff: pkg/analyzer/test/generated/static_warning_code_test.dart

Issue 1933783002: Add a failing test for generic tear-offs (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/static_warning_code_test.dart
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 14452334691b678842339209eb4d5544617b2c97..f8fc40d9a8723cf3d6f8f69d3db2a6a51a691d5f 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -19,6 +19,21 @@ main() {
@reflectiveTest
class StaticWarningCodeTest extends ResolverTestCase {
+ void fail_argumentTypeNotAssignable_tearOff_required() {
+ Source source = addSource(r'''
+class C {
+ Object/*=T*/ f/*<T>*/(Object/*=T*/ x) => x;
+}
+g(C c) {
+ var h = c.f/*<int>*/;
+ print(h('s'));
+}
+''');
+ computeLibrarySourceErrors(source);
+ assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+ verify([source]);
+ }
+
void fail_undefinedGetter() {
Source source = addSource(r'''
''');
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698