From a6094cdf3450ee706b5a87e3a4913baf9fd67a39 Mon Sep 17 00:00:00 2001 From: Franklin Oladipo Date: Thu, 24 Oct 2024 12:45:48 +0100 Subject: [PATCH 1/3] modify ASSIGNMENT_TO_CONST error message --- pkg/analyzer/messages.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml index 526862d928d9..427e3ef47fdc 100644 --- a/pkg/analyzer/messages.yaml +++ b/pkg/analyzer/messages.yaml @@ -788,7 +788,7 @@ CompileTimeErrorCode: } ``` ASSIGNMENT_TO_CONST: - problemMessage: "Constant variables can't be assigned a value." + problemMessage: "Constant variables can't be re-assigned a value." correctionMessage: "Try removing the assignment, or remove the modifier 'const' from the variable." hasPublishedDocs: true comment: No parameters. From e00e5cc824477ac2727cfc293f20b7a51b96acc5 Mon Sep 17 00:00:00 2001 From: "franklin.oladipo" Date: Wed, 6 Nov 2024 19:10:40 +0000 Subject: [PATCH 2/3] change ASSIGNMENT_TO_CONST error message --- pkg/analyzer/messages.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml index 427e3ef47fdc..6f574c82522f 100644 --- a/pkg/analyzer/messages.yaml +++ b/pkg/analyzer/messages.yaml @@ -788,7 +788,7 @@ CompileTimeErrorCode: } ``` ASSIGNMENT_TO_CONST: - problemMessage: "Constant variables can't be re-assigned a value." + problemMessage: "Constant variables can't be assigned a value after initialization." correctionMessage: "Try removing the assignment, or remove the modifier 'const' from the variable." hasPublishedDocs: true comment: No parameters. From 17b188fb1a397f664ddcbb39fa076c5a98074004 Mon Sep 17 00:00:00 2001 From: "franklin.oladipo" Date: Tue, 24 Dec 2024 21:59:14 +0000 Subject: [PATCH 3/3] generated files for messages.yaml --- pkg/analyzer/lib/src/error/codes.g.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart index 2c818bbf355a..beb58fa66a5b 100644 --- a/pkg/analyzer/lib/src/error/codes.g.dart +++ b/pkg/analyzer/lib/src/error/codes.g.dart @@ -156,7 +156,7 @@ class CompileTimeErrorCode extends ErrorCode { /// No parameters. static const CompileTimeErrorCode ASSIGNMENT_TO_CONST = CompileTimeErrorCode( 'ASSIGNMENT_TO_CONST', - "Constant variables can't be assigned a value.", + "Constant variables can't be assigned a value after initialization.", correctionMessage: "Try removing the assignment, or remove the modifier 'const' from the " "variable.",