| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/non_covariant_type_parameter.dart:10:41: Error: An extension type parameter can't be used non-covariantly in its representation type. |
| // Try removing the type parameters from function parameter types and type parameter bounds. |
| // extension type ET_Contravariant<T>(void Function(T) f) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/non_covariant_type_parameter.dart:12:37: Error: An extension type parameter can't be used non-covariantly in its representation type. |
| // Try removing the type parameters from function parameter types and type parameter bounds. |
| // extension type ET_Invariant<T>(void Function<S extends T>() f) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/non_covariant_type_parameter.dart:16:34: Error: An extension type parameter can't be used non-covariantly in its representation type. |
| // Try removing the type parameters from function parameter types and type parameter bounds. |
| // extension type ET_Bivariant<T>(T Function(T) f) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/non_covariant_type_parameter.dart:18:41: Error: An extension type parameter can't be used non-covariantly in its representation type. |
| // Try removing the type parameters from function parameter types and type parameter bounds. |
| // extension type ET_ContravariantAlias<T>(Contravariant<T> f) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/non_covariant_type_parameter.dart:20:37: Error: An extension type parameter can't be used non-covariantly in its representation type. |
| // Try removing the type parameters from function parameter types and type parameter bounds. |
| // extension type ET_InvariantAlias<T>(Invariant<T> f) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/non_covariant_type_parameter.dart:24:37: Error: An extension type parameter can't be used non-covariantly in its representation type. |
| // Try removing the type parameters from function parameter types and type parameter bounds. |
| // extension type ET_BivariantAlias<T>(Bivariant<T> f) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/non_covariant_type_parameter.dart:27:23: Error: An extension type parameter can't be used non-covariantly in its representation type. |
| // Try removing the type parameters from function parameter types and type parameter bounds. |
| // (Contravariant<T> Function() f) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/non_covariant_type_parameter.dart:30:11: Error: An extension type parameter can't be used non-covariantly in its representation type. |
| // Try removing the type parameters from function parameter types and type parameter bounds. |
| // (void Function(Covariant<T>) f) /* Error */ {} |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| typedef Contravariant<contravariant T extends core::Object? = dynamic> = (T%) → void; |
| typedef Invariant<invariant T extends core::Object? = dynamic> = <S extends T% = dynamic>() → void; |
| typedef Covariant<T extends core::Object? = dynamic> = () → T%; |
| typedef Bivariant<invariant T extends core::Object? = dynamic> = (T%) → T%; |
| extension type ET_Contravariant<T extends core::Object? = dynamic>((T%) → void f) { |
| abstract extension-type-member representation-field get f() → (T%) → void; |
| constructor • = self::ET_Contravariant|constructor#; |
| constructor tearoff • = self::ET_Contravariant|constructor#_#new#tearOff; |
| } |
| extension type ET_Invariant<T extends core::Object? = dynamic>(<S extends T% = dynamic>() → void f) { |
| abstract extension-type-member representation-field get f() → <S extends T% = dynamic>() → void; |
| constructor • = self::ET_Invariant|constructor#; |
| constructor tearoff • = self::ET_Invariant|constructor#_#new#tearOff; |
| } |
| extension type ET_Covariant<T extends core::Object? = dynamic>(() → T% f) { |
| abstract extension-type-member representation-field get f() → () → T%; |
| constructor • = self::ET_Covariant|constructor#; |
| constructor tearoff • = self::ET_Covariant|constructor#_#new#tearOff; |
| } |
| extension type ET_Bivariant<T extends core::Object? = dynamic>((T%) → T% f) { |
| abstract extension-type-member representation-field get f() → (T%) → T%; |
| constructor • = self::ET_Bivariant|constructor#; |
| constructor tearoff • = self::ET_Bivariant|constructor#_#new#tearOff; |
| } |
| extension type ET_ContravariantAlias<T extends core::Object? = dynamic>((T%) → void f) { |
| abstract extension-type-member representation-field get f() → (T%) → void; |
| constructor • = self::ET_ContravariantAlias|constructor#; |
| constructor tearoff • = self::ET_ContravariantAlias|constructor#_#new#tearOff; |
| } |
| extension type ET_InvariantAlias<T extends core::Object? = dynamic>(<S extends T% = dynamic>() → void f) { |
| abstract extension-type-member representation-field get f() → <S extends T% = dynamic>() → void; |
| constructor • = self::ET_InvariantAlias|constructor#; |
| constructor tearoff • = self::ET_InvariantAlias|constructor#_#new#tearOff; |
| } |
| extension type ET_CovariantAlias<T extends core::Object? = dynamic>(() → T% f) { |
| abstract extension-type-member representation-field get f() → () → T%; |
| constructor • = self::ET_CovariantAlias|constructor#; |
| constructor tearoff • = self::ET_CovariantAlias|constructor#_#new#tearOff; |
| } |
| extension type ET_BivariantAlias<T extends core::Object? = dynamic>((T%) → T% f) { |
| abstract extension-type-member representation-field get f() → (T%) → T%; |
| constructor • = self::ET_BivariantAlias|constructor#; |
| constructor tearoff • = self::ET_BivariantAlias|constructor#_#new#tearOff; |
| } |
| extension type ET_ContravariantAlias1<T extends core::Object? = dynamic>(() → (T%) → void f) { |
| abstract extension-type-member representation-field get f() → () → (T%) → void; |
| constructor • = self::ET_ContravariantAlias1|constructor#; |
| constructor tearoff • = self::ET_ContravariantAlias1|constructor#_#new#tearOff; |
| } |
| extension type ET_ContravariantAlias2<T extends core::Object? = dynamic>((() → T%) → void f) { |
| abstract extension-type-member representation-field get f() → (() → T%) → void; |
| constructor • = self::ET_ContravariantAlias2|constructor#; |
| constructor tearoff • = self::ET_ContravariantAlias2|constructor#_#new#tearOff; |
| } |
| extension type ET_CovariantAlias1<T extends core::Object? = dynamic>(() → () → T% f) { |
| abstract extension-type-member representation-field get f() → () → () → T%; |
| constructor • = self::ET_CovariantAlias1|constructor#; |
| constructor tearoff • = self::ET_CovariantAlias1|constructor#_#new#tearOff; |
| } |
| extension type ET_CovariantAlias2<T extends core::Object? = dynamic>(((T%) → void) → void f) { |
| abstract extension-type-member representation-field get f() → ((T%) → void) → void; |
| constructor • = self::ET_CovariantAlias2|constructor#; |
| constructor tearoff • = self::ET_CovariantAlias2|constructor#_#new#tearOff; |
| } |
| static extension-type-member method ET_Contravariant|constructor#<T extends core::Object? = dynamic>((self::ET_Contravariant|constructor#::T%) → void f) → self::ET_Contravariant<self::ET_Contravariant|constructor#::T%>% /* erasure=(self::ET_Contravariant|constructor#::T%) → void, declared=! */ { |
| lowered final self::ET_Contravariant<self::ET_Contravariant|constructor#::T%>% /* erasure=(self::ET_Contravariant|constructor#::T%) → void, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_Contravariant|constructor#_#new#tearOff<T extends core::Object? = dynamic>((self::ET_Contravariant|constructor#_#new#tearOff::T%) → void f) → self::ET_Contravariant<self::ET_Contravariant|constructor#_#new#tearOff::T%>% /* erasure=(self::ET_Contravariant|constructor#_#new#tearOff::T%) → void, declared=! */ |
| return self::ET_Contravariant|constructor#<self::ET_Contravariant|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_Invariant|constructor#<T extends core::Object? = dynamic>(<S extends self::ET_Invariant|constructor#::T% = dynamic>() → void f) → self::ET_Invariant<self::ET_Invariant|constructor#::T%>% /* erasure=<S extends self::ET_Invariant|constructor#::T% = dynamic>() → void, declared=! */ { |
| lowered final self::ET_Invariant<self::ET_Invariant|constructor#::T%>% /* erasure=<S extends self::ET_Invariant|constructor#::T% = dynamic>() → void, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_Invariant|constructor#_#new#tearOff<T extends core::Object? = dynamic>(<S extends self::ET_Invariant|constructor#_#new#tearOff::T% = dynamic>() → void f) → self::ET_Invariant<self::ET_Invariant|constructor#_#new#tearOff::T%>% /* erasure=<S extends self::ET_Invariant|constructor#_#new#tearOff::T% = dynamic>() → void, declared=! */ |
| return self::ET_Invariant|constructor#<self::ET_Invariant|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_Covariant|constructor#<T extends core::Object? = dynamic>(() → self::ET_Covariant|constructor#::T% f) → self::ET_Covariant<self::ET_Covariant|constructor#::T%>% /* erasure=() → self::ET_Covariant|constructor#::T%, declared=! */ { |
| lowered final self::ET_Covariant<self::ET_Covariant|constructor#::T%>% /* erasure=() → self::ET_Covariant|constructor#::T%, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_Covariant|constructor#_#new#tearOff<T extends core::Object? = dynamic>(() → self::ET_Covariant|constructor#_#new#tearOff::T% f) → self::ET_Covariant<self::ET_Covariant|constructor#_#new#tearOff::T%>% /* erasure=() → self::ET_Covariant|constructor#_#new#tearOff::T%, declared=! */ |
| return self::ET_Covariant|constructor#<self::ET_Covariant|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_Bivariant|constructor#<T extends core::Object? = dynamic>((self::ET_Bivariant|constructor#::T%) → self::ET_Bivariant|constructor#::T% f) → self::ET_Bivariant<self::ET_Bivariant|constructor#::T%>% /* erasure=(self::ET_Bivariant|constructor#::T%) → self::ET_Bivariant|constructor#::T%, declared=! */ { |
| lowered final self::ET_Bivariant<self::ET_Bivariant|constructor#::T%>% /* erasure=(self::ET_Bivariant|constructor#::T%) → self::ET_Bivariant|constructor#::T%, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_Bivariant|constructor#_#new#tearOff<T extends core::Object? = dynamic>((self::ET_Bivariant|constructor#_#new#tearOff::T%) → self::ET_Bivariant|constructor#_#new#tearOff::T% f) → self::ET_Bivariant<self::ET_Bivariant|constructor#_#new#tearOff::T%>% /* erasure=(self::ET_Bivariant|constructor#_#new#tearOff::T%) → self::ET_Bivariant|constructor#_#new#tearOff::T%, declared=! */ |
| return self::ET_Bivariant|constructor#<self::ET_Bivariant|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_ContravariantAlias|constructor#<T extends core::Object? = dynamic>((self::ET_ContravariantAlias|constructor#::T%) → void f) → self::ET_ContravariantAlias<self::ET_ContravariantAlias|constructor#::T%>% /* erasure=(self::ET_ContravariantAlias|constructor#::T%) → void, declared=! */ { |
| lowered final self::ET_ContravariantAlias<self::ET_ContravariantAlias|constructor#::T%>% /* erasure=(self::ET_ContravariantAlias|constructor#::T%) → void, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_ContravariantAlias|constructor#_#new#tearOff<T extends core::Object? = dynamic>((self::ET_ContravariantAlias|constructor#_#new#tearOff::T%) → void f) → self::ET_ContravariantAlias<self::ET_ContravariantAlias|constructor#_#new#tearOff::T%>% /* erasure=(self::ET_ContravariantAlias|constructor#_#new#tearOff::T%) → void, declared=! */ |
| return self::ET_ContravariantAlias|constructor#<self::ET_ContravariantAlias|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_InvariantAlias|constructor#<T extends core::Object? = dynamic>(<S extends self::ET_InvariantAlias|constructor#::T% = dynamic>() → void f) → self::ET_InvariantAlias<self::ET_InvariantAlias|constructor#::T%>% /* erasure=<S extends self::ET_InvariantAlias|constructor#::T% = dynamic>() → void, declared=! */ { |
| lowered final self::ET_InvariantAlias<self::ET_InvariantAlias|constructor#::T%>% /* erasure=<S extends self::ET_InvariantAlias|constructor#::T% = dynamic>() → void, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_InvariantAlias|constructor#_#new#tearOff<T extends core::Object? = dynamic>(<S extends self::ET_InvariantAlias|constructor#_#new#tearOff::T% = dynamic>() → void f) → self::ET_InvariantAlias<self::ET_InvariantAlias|constructor#_#new#tearOff::T%>% /* erasure=<S extends self::ET_InvariantAlias|constructor#_#new#tearOff::T% = dynamic>() → void, declared=! */ |
| return self::ET_InvariantAlias|constructor#<self::ET_InvariantAlias|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_CovariantAlias|constructor#<T extends core::Object? = dynamic>(() → self::ET_CovariantAlias|constructor#::T% f) → self::ET_CovariantAlias<self::ET_CovariantAlias|constructor#::T%>% /* erasure=() → self::ET_CovariantAlias|constructor#::T%, declared=! */ { |
| lowered final self::ET_CovariantAlias<self::ET_CovariantAlias|constructor#::T%>% /* erasure=() → self::ET_CovariantAlias|constructor#::T%, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_CovariantAlias|constructor#_#new#tearOff<T extends core::Object? = dynamic>(() → self::ET_CovariantAlias|constructor#_#new#tearOff::T% f) → self::ET_CovariantAlias<self::ET_CovariantAlias|constructor#_#new#tearOff::T%>% /* erasure=() → self::ET_CovariantAlias|constructor#_#new#tearOff::T%, declared=! */ |
| return self::ET_CovariantAlias|constructor#<self::ET_CovariantAlias|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_BivariantAlias|constructor#<T extends core::Object? = dynamic>((self::ET_BivariantAlias|constructor#::T%) → self::ET_BivariantAlias|constructor#::T% f) → self::ET_BivariantAlias<self::ET_BivariantAlias|constructor#::T%>% /* erasure=(self::ET_BivariantAlias|constructor#::T%) → self::ET_BivariantAlias|constructor#::T%, declared=! */ { |
| lowered final self::ET_BivariantAlias<self::ET_BivariantAlias|constructor#::T%>% /* erasure=(self::ET_BivariantAlias|constructor#::T%) → self::ET_BivariantAlias|constructor#::T%, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_BivariantAlias|constructor#_#new#tearOff<T extends core::Object? = dynamic>((self::ET_BivariantAlias|constructor#_#new#tearOff::T%) → self::ET_BivariantAlias|constructor#_#new#tearOff::T% f) → self::ET_BivariantAlias<self::ET_BivariantAlias|constructor#_#new#tearOff::T%>% /* erasure=(self::ET_BivariantAlias|constructor#_#new#tearOff::T%) → self::ET_BivariantAlias|constructor#_#new#tearOff::T%, declared=! */ |
| return self::ET_BivariantAlias|constructor#<self::ET_BivariantAlias|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_ContravariantAlias1|constructor#<T extends core::Object? = dynamic>(() → (self::ET_ContravariantAlias1|constructor#::T%) → void f) → self::ET_ContravariantAlias1<self::ET_ContravariantAlias1|constructor#::T%>% /* erasure=() → (self::ET_ContravariantAlias1|constructor#::T%) → void, declared=! */ { |
| lowered final self::ET_ContravariantAlias1<self::ET_ContravariantAlias1|constructor#::T%>% /* erasure=() → (self::ET_ContravariantAlias1|constructor#::T%) → void, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_ContravariantAlias1|constructor#_#new#tearOff<T extends core::Object? = dynamic>(() → (self::ET_ContravariantAlias1|constructor#_#new#tearOff::T%) → void f) → self::ET_ContravariantAlias1<self::ET_ContravariantAlias1|constructor#_#new#tearOff::T%>% /* erasure=() → (self::ET_ContravariantAlias1|constructor#_#new#tearOff::T%) → void, declared=! */ |
| return self::ET_ContravariantAlias1|constructor#<self::ET_ContravariantAlias1|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_ContravariantAlias2|constructor#<T extends core::Object? = dynamic>((() → self::ET_ContravariantAlias2|constructor#::T%) → void f) → self::ET_ContravariantAlias2<self::ET_ContravariantAlias2|constructor#::T%>% /* erasure=(() → self::ET_ContravariantAlias2|constructor#::T%) → void, declared=! */ { |
| lowered final self::ET_ContravariantAlias2<self::ET_ContravariantAlias2|constructor#::T%>% /* erasure=(() → self::ET_ContravariantAlias2|constructor#::T%) → void, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_ContravariantAlias2|constructor#_#new#tearOff<T extends core::Object? = dynamic>((() → self::ET_ContravariantAlias2|constructor#_#new#tearOff::T%) → void f) → self::ET_ContravariantAlias2<self::ET_ContravariantAlias2|constructor#_#new#tearOff::T%>% /* erasure=(() → self::ET_ContravariantAlias2|constructor#_#new#tearOff::T%) → void, declared=! */ |
| return self::ET_ContravariantAlias2|constructor#<self::ET_ContravariantAlias2|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_CovariantAlias1|constructor#<T extends core::Object? = dynamic>(() → () → self::ET_CovariantAlias1|constructor#::T% f) → self::ET_CovariantAlias1<self::ET_CovariantAlias1|constructor#::T%>% /* erasure=() → () → self::ET_CovariantAlias1|constructor#::T%, declared=! */ { |
| lowered final self::ET_CovariantAlias1<self::ET_CovariantAlias1|constructor#::T%>% /* erasure=() → () → self::ET_CovariantAlias1|constructor#::T%, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_CovariantAlias1|constructor#_#new#tearOff<T extends core::Object? = dynamic>(() → () → self::ET_CovariantAlias1|constructor#_#new#tearOff::T% f) → self::ET_CovariantAlias1<self::ET_CovariantAlias1|constructor#_#new#tearOff::T%>% /* erasure=() → () → self::ET_CovariantAlias1|constructor#_#new#tearOff::T%, declared=! */ |
| return self::ET_CovariantAlias1|constructor#<self::ET_CovariantAlias1|constructor#_#new#tearOff::T%>(f); |
| static extension-type-member method ET_CovariantAlias2|constructor#<T extends core::Object? = dynamic>(((self::ET_CovariantAlias2|constructor#::T%) → void) → void f) → self::ET_CovariantAlias2<self::ET_CovariantAlias2|constructor#::T%>% /* erasure=((self::ET_CovariantAlias2|constructor#::T%) → void) → void, declared=! */ { |
| lowered final self::ET_CovariantAlias2<self::ET_CovariantAlias2|constructor#::T%>% /* erasure=((self::ET_CovariantAlias2|constructor#::T%) → void) → void, declared=! */ #this = f; |
| return #this; |
| } |
| static extension-type-member method ET_CovariantAlias2|constructor#_#new#tearOff<T extends core::Object? = dynamic>(((self::ET_CovariantAlias2|constructor#_#new#tearOff::T%) → void) → void f) → self::ET_CovariantAlias2<self::ET_CovariantAlias2|constructor#_#new#tearOff::T%>% /* erasure=((self::ET_CovariantAlias2|constructor#_#new#tearOff::T%) → void) → void, declared=! */ |
| return self::ET_CovariantAlias2|constructor#<self::ET_CovariantAlias2|constructor#_#new#tearOff::T%>(f); |