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

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

Issue 1407903011: Better error message when missing new or const (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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/analyzer/lib/src/generated/error.dart ('k') | 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_type_warning_code_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 99ab84c21c7f74b5be5fa4ff3bca74de1db49c6f..d98f837d29eb22ceffbf15c4851fa557bd16403b 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -1600,6 +1600,19 @@ f() => A?.toString();
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
}
+ void test_undefinedMethodWithConstructor() {
+ Source source = addSource(r'''
+class C {
+ C.m();
+}
+f() {
+ C c = C.m();
+}''');
+ computeLibrarySourceErrors(source);
+ assertErrors(
+ source, [StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR]);
+ }
+
void test_undefinedOperator_indexBoth() {
Source source = addSource(r'''
class A {}
« no previous file with comments | « pkg/analyzer/lib/src/generated/error.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698