eba2982bc8
Report a dedicated diagnostic when an augmenting field or top-level variable induces a getter whose return type differs from the getter being augmented. Previously, augmentation return type checking only covered executable declarations with explicit return type annotations. Variable augmentations that induced getters could therefore miss this mismatch, or would not describe the induced getter case directly. Add the new diagnostic code and use it for getter fragments induced by variables. Keep the existing augmentation return type mismatch diagnostic for methods and explicitly declared getters, and report the induced getter diagnostic on the variable name so that mismatches in multi-variable declarations are attributed to the specific variable. Change-Id: Ifb421112d659815070110834702f68616e360a10 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/504181 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>