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

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

Issue 2813553006: Split error code to ease future improvements (Closed)
Patch Set: Created 3 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
Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 8fc72fab1aa25743af82e243262118a506770a7d..9c871e6fbe1a673ba83594d3c0198898965981b3 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -2190,6 +2190,34 @@ class B extends A {
verify([source]);
}
+ test_extraPositionalArgumentsCouldBeNamed_const() async {
+ Source source = addSource(r'''
+class A {
+ const A({int x});
+}
+main() {
+ const A(0);
+}''');
+ await computeAnalysisResult(source);
+ assertErrors(source,
+ [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
+ verify([source]);
+ }
+
+ test_extraPositionalArgumentsCouldBeNamed_const_super() async {
+ Source source = addSource(r'''
+class A {
+ const A({int x});
+}
+class B extends A {
+ const B() : super(0);
+}''');
+ await computeAnalysisResult(source);
+ assertErrors(source,
+ [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
+ verify([source]);
+ }
+
test_fieldFormalParameter_assignedInInitializer() async {
Source source = addSource(r'''
class A {
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/static_warning_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698