@@ -18,20 +18,19 @@ abstract class A<T> {
1818class AFactory {
1919 // Compile time error: should be AFactory<T> to match abstract class above
2020 factory A .create () {
21- // ^
22- // [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS
23- // [cfe] The name of a constructor must match the name of the enclosing class.
21+ // ^
22+ // [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS
23+ // [cfe] The name of a constructor must match the name of the enclosing class.
2424 throw UnimplementedError ();
2525 }
2626}
2727
2828abstract class Link <T > extends IterableBase <T > {
2929 // does not match constructor for LinkFactory
30- factory Link (T head, [Link <T >? tail]) =
31- LinkFactory <T >;
32- // ^^^^^^^^^^^^^^
33- // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
34- // [cfe] The constructor function type 'LinkFactory<T> Function(dynamic, [Link<dynamic>?])' isn't a subtype of 'Link<T> Function(T, [Link<T>?])'.
30+ factory Link (T head, [Link <T >? tail]) = LinkFactory <T >;
31+ // ^^^^^^^^^^^^^^
32+ // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE
33+ // [cfe] The constructor function type 'LinkFactory<T> Function(dynamic, [Link<dynamic>?])' isn't a subtype of 'Link<T> Function(T, [Link<T>?])'.
3534 Link <T > prepend (T element);
3635}
3736
@@ -47,9 +46,9 @@ class LinkFactory<T> {
4746
4847// Does not implement all of Iterable
4948class AbstractLink <T > implements Link <T > {
50- // ^^^^^^^^^^^^
51- // [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
52- // [cfe] The non-abstract class 'AbstractLink' is missing implementations for these members:
49+ // ^^^^^^^^^^^^
50+ // [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER
51+ // [cfe] The non-abstract class 'AbstractLink' is missing implementations for these members:
5352 const AbstractLink ();
5453 Link <T > prepend (T element) {
5554 return new Link <T >(element, this );
@@ -58,15 +57,15 @@ class AbstractLink<T> implements Link<T> {
5857
5958// Does not implement all of Iterable
6059class LinkTail <T > extends AbstractLink <T > implements EmptyLink <T > {
61- // ^^^^^^^ ^
62- // [cfe] The non-abstract class 'LinkTail' is missing implementations for these members:
60+ // ^
61+ // [cfe] The non-abstract class 'LinkTail' is missing implementations for these members:
6362 const LinkTail ();
6463}
6564
6665// Does not implement all of Iterable
6766class LinkEntry <T > extends AbstractLink <T > {
68- // ^^^^^^^^ ^
69- // [cfe] The non-abstract class 'LinkEntry' is missing implementations for these members:
67+ // ^
68+ // [cfe] The non-abstract class 'LinkEntry' is missing implementations for these members:
7069 LinkEntry (T head, Link <T >? realTail);
7170}
7271
0 commit comments