Skip to content

Child actions code generation fails on 8.0.0 #159

@westracer

Description

@westracer

Version 7.5.11 works fine, but I have to override dependencies to use it.

Minimal reproducible example:

abstract class HomeActions implements ReduxActions {
  HomeActions._();
  factory HomeActions() = _$HomeActions;
}

abstract class AppActions extends ReduxActions {
  AppActions._();
  factory AppActions() = _$AppActions;

  HomeActions get home;
}

causes:

[INFO] built_redux:built_redux on lib/domain/actions/app_actions.dart:Generating action classes for AppActions
[SEVERE] built_redux:built_redux on lib/domain/actions/app_actions.dart:
An error FormatterException occurred while formatting the generated source for
package:***/domain/actions/app_actions.dart
which was output to
lib/domain/actions/app_actions.built_redux.g.part.
This may indicate an issue in the generator, the input source code, or in the
source formatter.
Could not format because the source could not be parsed:

line 21, column 27 of .: Expected an identifier.

21 │ final home = HomeActions*();
│ ^

Note: My project doesn't use NNBD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions