diff --git a/packages/combinator/lib/src/combinator/combinator.dart b/packages/combinator/lib/src/combinator/combinator.dart index 4048d934..10cbaf5d 100644 --- a/packages/combinator/lib/src/combinator/combinator.dart +++ b/packages/combinator/lib/src/combinator/combinator.dart @@ -196,8 +196,8 @@ abstract class Parser { v.isEmpty ? [] : (r.value?[0] == null ? [] : [r.value?[0]]); var out = List.from(preceding); if (r.value?[1] != null) { - (r.value?[1] as List).forEach((element) { - out.add(element); + r.value?[1].forEach((element) { + out.add(element as T); }); } return out;