From 20c1d3af9dfc5e0ff64baf537a3f7fbeec3f961c Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 4 Dec 2025 05:24:01 -0800 Subject: [PATCH] [messages] Fix error message. Fixes the error message emitted by `MessageWithAnalyzerCode.decodeType` if the type of the YAML node is not a string. Change-Id: I6a6a6964a5ad3f5dad1913ec37b77ceecc0bd576 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465968 Commit-Queue: Paul Berry Reviewed-by: Johnni Winther --- pkg/analyzer_utilities/lib/analyzer_messages.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/analyzer_utilities/lib/analyzer_messages.dart b/pkg/analyzer_utilities/lib/analyzer_messages.dart index 4e488c63d61..032e6c36141 100644 --- a/pkg/analyzer_utilities/lib/analyzer_messages.dart +++ b/pkg/analyzer_utilities/lib/analyzer_messages.dart @@ -729,6 +729,6 @@ LocatableDiagnostic $withArgumentsName({$withArgumentsParams}) { YamlScalar(:String value) => AnalyzerDiagnosticType.fromString(value) ?? (throw 'Unknown analyzer diagnostic type'), - _ => throw 'Must be a bool', + _ => throw 'Must be a string', }; }