mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
handle deserializing metadata diagnostic targets
Change-Id: I47f747baf48d6fc3a0e04871990d0743dbbb41e4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352560 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Jake Macdonald <jakemac@google.com> Auto-Submit: Jake Macdonald <jakemac@google.com>
This commit is contained in:
parent
48cbd9b322
commit
2624743bdd
|
@ -501,9 +501,11 @@ extension DeserializerExtensions on Deserializer {
|
|||
new DiagnosticMessage(message, target: target.asDiagnosticTarget),
|
||||
TypeAnnotationImpl() =>
|
||||
new DiagnosticMessage(message, target: target.asDiagnosticTarget),
|
||||
MetadataAnnotationImpl() =>
|
||||
new DiagnosticMessage(message, target: target.asDiagnosticTarget),
|
||||
_ => throw new UnsupportedError(
|
||||
'Unsupported target type ${target.runtimeType}, only Declarations '
|
||||
'and TypeAnnotations are allowed.'),
|
||||
'Unsupported target type ${target.runtimeType}, only Declarations, '
|
||||
'TypeAnnotations, and Metadata are allowed.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ class EnumField {
|
|||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class EnumField {
|
||||
class DuplicateJsonKey {
|
||||
@JsonKey()
|
||||
@JsonKey()
|
||||
//^^^^^^^^^^
|
||||
|
|
Loading…
Reference in a new issue