Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't infer type parameter 'N extends Built<N, NB>'. #127

Open
Jorgezz opened this issue Sep 11, 2019 · 1 comment
Open

Couldn't infer type parameter 'N extends Built<N, NB>'. #127

Jorgezz opened this issue Sep 11, 2019 · 1 comment

Comments

@Jorgezz
Copy link

Jorgezz commented Sep 11, 2019

error: Couldn't infer type parameter 'N extends Built<N, NB>'.

Tried to infer 'AppState' for 'N extends Built<N, NB>' which doesn't work:
Type parameter 'N extends Built<N, NB>' declared to extend 'Built<AppState, NB extends Builder<N, NB>>'.
The type 'AppState' was inferred from:
Parameter 'nested' declared as 'NestedReducerBuilder<AppState, AppStateBuilder, N, NB>'
but argument is 'NestedReducerBuilder<AppState, AppStateBuilder, AppState, AppStateBuilder>'.

Consider passing explicit type argument(s) to the generic.

(could_not_infer at [xxx] lib/engine/app_reducers.dart:35)

code:
final appReducerBuilder = ReducerBuilder<AppState, AppStateBuilder>()
..combineNested(aReducerBuilder) etc...

final debugReducerBuilder = NestedReducerBuilder<AppState, AppStateBuilder,
DebugState, DebugStateBuilder>((s) => s.debugState, (b) => b.debugState)
..add(DebugActionsNames.toggleShowPerformanceOverlayAction,
_toggleShowPerformanceOverlay)
..add(DebugActionsNames.toggleStaggeredTileUseFit,
_toggleStaggeredTileUseExtent)
..add(DebugActionsNames.toggleApiEnvironment, _toggleTestEnvironment)
..add(DebugActionsNames.toggleMotiveDetectorDebug, _toggleMotionDetectorDebug);

@davidmarne
Copy link
Contributor

this appears to be a bug that got introduced to the analyzer in dart 2.5
there was an issue created here: dart-lang/sdk#38365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants