Files
sdk/tests/language/mixin/interface_check_test.dart
T
Sam Rawlins cddd44e1e9 analyzer: Add separate code for concrete implementation override check
Erik wrote a great explanation for this check here:
https://github.com/dart-lang/sdk/issues/37993#issuecomment-757976910

Fixes https://github.com/dart-lang/sdk/issues/37993

Change-Id: I6fb0bd530fac495115314838ec0bb2168d5e9ad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180088
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-20 21:27:43 +00:00

34 lines
686 B
Dart

// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
class Thing {}
class SubThing extends Thing {
void sub() {}
}
class A {
Thing get thing => new Thing();
}
abstract class B implements A {
@override
SubThing get thing;
}
class C extends A //
// ^
// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE
// [cfe] The implementation of 'thing' in the non-abstract class 'C' does not conform to its interface.
with
B
{}
main() {
new C()
.thing //
.sub()
;
}