Open
Description
Consider the following program (consisting of two files, one library and one library augmentation, passing --enable-experiment=macros
to the tools):
// --- Library augmentation 'augment.dart'.
augment library 'main.dart';
augment class C {
augment void foo() {}
}
// --- Library 'main.dart'.
import augment 'augment.dart';
class C {
void foo();
}
This is accepted by the analyzer using dart analyze main.dart
but rejected by the common front end with dart main.dart
:
main.dart:4:7: Error: The non-abstract class 'C' is missing implementations for these members:
- C.foo
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class C {
^
main.dart:5:8: Context: 'C.foo' is defined here.
void foo();
^^^
I would expect the abstract declaration in 'main.dart' to be accepted because it is transformed into a concrete declaration by the augmentation in augment.dart
.