You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2017. It is now read-only.
@Injectable()
class GenericType<T> {
String desc;
GenericType(this.desc);
}
@Injectable()
class NeedsGenerticTypeString {
GenericType<String> myObj;
NeedsGenerticTypeString(this.myObj);
}
And run the following test:
ii("Non-core types and TypeLiteral do not work with each other", () {
var injector = new ModuleInjector([moduleFactory()
..bind(NeedsGenerticTypeString)
..bind(new TypeLiteral<GenericType<String>>().type, toValue: new GenericType("String"))
]);
expect(() => injector.get(NeedsGenerticTypeString)).not.toThrow();
});
It will fail with "No provider found for GenericType!"
This is because this expression (in generator.dart)
To reproduce define two types
And run the following test:
It will fail with "No provider found for GenericType!"
This is because this expression (in generator.dart)
if (typeArgs != null && typeArgs.isNotEmpty && typeArgs.any((arg) => arg is! dynamic))
Will never evaluate to true.
The text was updated successfully, but these errors were encountered: