sdk icon indicating copy to clipboard operation
sdk copied to clipboard

`invalid_implementation_override` false-positive (?)

Open FMorschel opened this issue 1 week ago • 5 comments

Repro:

class Other {}
class Another extends Other {}

abstract class A {
  Other? field;
}

abstract class B extends A {
  @override
  Another? get field;
}

class C extends B {}
//    ^ invalid_implementation_override

Error:

'A.field' ('Other? Function()') isn't a valid concrete implementation of 'B.field' ('Another? Function()').

But I would expect this to ask me to implement Another get field. Not for it to use the parent implementation.

CC @bwilkerson @lrhn

FMorschel avatar Dec 01 '25 17:12 FMorschel