Skip to content

Commit

Permalink
update mappers
Browse files Browse the repository at this point in the history
  • Loading branch information
schultek committed Jan 30, 2024
1 parent bb6aa17 commit 21f2849
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class BrandListMapper extends SubClassMapperBase<BrandList> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: []);
return context.inherit(args: () => []);
}

static BrandList _instantiate(DecodingData data) {
Expand Down Expand Up @@ -791,7 +791,7 @@ class KeyedItemListMapper extends SubClassMapperBase<KeyedItemList> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: [dynamic, context.arg(0)]);
return context.inherit(args: () => [dynamic, context.arg(0)]);
}

static KeyedItemList<K, T> _instantiate<K, T>(DecodingData data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class DMapper extends SubClassMapperBase<D> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: [dynamic, context.arg(0)]);
return context.inherit(args: () => [dynamic, context.arg(0)]);
}

static D<T, V> _instantiate<T, V>(DecodingData data) {
Expand Down Expand Up @@ -444,10 +444,11 @@ class EMapper extends SubClassMapperBase<E> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: [
context.arg(1, [0]),
context.arg(0)
]);
return context.inherit(
args: () => [
context.arg(1, [0]),
context.arg(0)
]);
}

static E<T, V> _instantiate<T, V>(DecodingData data) {
Expand Down Expand Up @@ -551,7 +552,7 @@ class FMapper extends SubClassMapperBase<F> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: []);
return context.inherit(args: () => []);
}

static F _instantiate(DecodingData data) {
Expand Down Expand Up @@ -657,10 +658,11 @@ class GMapper extends SubClassMapperBase<G> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: [
context.arg(0),
context.type(<$A>() => A<$A>, [context.arg(0)])
]);
return context.inherit(
args: () => [
context.arg(0),
context.type(<$A>() => A<$A>, [context.arg(0)])
]);
}

static G<T, V> _instantiate<T, V extends A<T>>(DecodingData data) {
Expand Down Expand Up @@ -769,7 +771,7 @@ class HMapper extends SubClassMapperBase<H> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: [C<num>]);
return context.inherit(args: () => [C<num>]);
}

static H<T> _instantiate<T extends C<num>>(DecodingData data) {
Expand Down Expand Up @@ -879,10 +881,11 @@ class IMapper extends SubClassMapperBase<I> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: [
context.type(<$A extends num>() => C<$A>, [context.arg(0)]),
context.arg(0)
]);
return context.inherit(
args: () => [
context.type(<$A extends num>() => C<$A>, [context.arg(0)]),
context.arg(0)
]);
}

static I<T, V> _instantiate<T extends C<V>, V extends num>(
Expand Down Expand Up @@ -994,12 +997,13 @@ class JMapper extends SubClassMapperBase<J> {

@override
DecodingContext inherit(DecodingContext context) {
return context.inherit(args: [
context.type(<$A extends $B, $B extends num>() => C<$A>,
[context.arg(0), context.arg(1)]),
context.arg(0),
context.arg(1)
]);
return context.inherit(
args: () => [
context.type(<$A extends $B, $B extends num>() => C<$A>,
[context.arg(0), context.arg(1)]),
context.arg(0),
context.arg(1)
]);
}

static J<T, V, U> _instantiate<T extends C<V>, V extends U, U extends num>(
Expand Down

0 comments on commit 21f2849

Please sign in to comment.