refactor(di): cleanup to make dartanalyzer happy
This commit is contained in:
parent
97667e2591
commit
f0870791f6
|
@ -56,7 +56,8 @@ class Reflector {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ParameterMirror> _functionParameters(Function func) {
|
List<ParameterMirror> _functionParameters(Function func) {
|
||||||
return reflect(func).function.parameters;
|
var closureMirror = reflect(func);
|
||||||
|
return closureMirror.function.parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ParameterMirror> _constructorParameters(Type type) {
|
List<ParameterMirror> _constructorParameters(Type type) {
|
||||||
|
|
|
@ -208,7 +208,7 @@ export function main() {
|
||||||
bind(Engine).toFactory(() => isBroken ? new BrokenEngine() : new Engine())
|
bind(Engine).toFactory(() => isBroken ? new BrokenEngine() : new Engine())
|
||||||
]);
|
]);
|
||||||
|
|
||||||
expect(() => injector.get(Car)).toThrow();
|
expect(() => injector.get(Car)).toThrowError(new RegExp("Error"));
|
||||||
|
|
||||||
isBroken = false;
|
isBroken = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue