jugger.dart
jugger.dart copied to clipboard
Build broken code
Describe the error:
late final _i2.IProvider<int> _intProvider = _i2.SingletonProvider<int>(() =>
_i1.ChildModule.provideInt(_parent._iParentComponentProvider.get()));
^
Code for reproduce:
import 'package:jugger/jugger.dart';
@Component(modules: <Type>[ParentModule])
abstract class IParentComponent {
String get string;
@subcomponentFactory
IChildComponent createChildComponent();
}
@Subcomponent(modules: <Type>[ChildModule])
@singleton
abstract class IChildComponent {
int get i;
}
@module
abstract class ParentModule {
@provides
static String provideString(
IParentComponent component,
) {
return '';
}
}
@module
abstract class ChildModule {
@provides
@singleton
static int provideInt(IParentComponent c) {
return 0;
}
}
jugger version 3.1.1