refactor(di): cleanup to make dartanalyzer happy

This commit is contained in:
vsavkin 2014-10-10 10:00:23 -04:00
parent 97667e2591
commit f0870791f6
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -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;