[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 <paulberry@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
@@ -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',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user