From 85f3547a23f59608b5129c30bce912332a89f7f1 Mon Sep 17 00:00:00 2001 From: Rado Kirov Date: Wed, 27 Aug 2014 11:27:55 -0700 Subject: [PATCH] fix(directive-injector): wrong variable name in error thrown. Add proper type annotation that would have caught the typo. --- lib/core_dom/directive_injector.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core_dom/directive_injector.dart b/lib/core_dom/directive_injector.dart index 7552e4642..283450ca6 100644 --- a/lib/core_dom/directive_injector.dart +++ b/lib/core_dom/directive_injector.dart @@ -324,7 +324,7 @@ class DirectiveInjector implements DirectiveBinder { dynamic _new(Key k, List paramKeys, Function fn) { if (_constructionDepth > MAX_CONSTRUCTION_DEPTH) { _constructionDepth = NO_CONSTRUCTION; - throw new DiCircularDependencyError(key); + throw new DiCircularDependencyError(k); } bool isFirstConstruction = (_constructionDepth++ == NO_CONSTRUCTION); var oldTag = _TAG_GET.makeCurrent(); @@ -479,7 +479,7 @@ class ComponentDirectiveInjector extends DirectiveInjector { // For efficiency we run through the maximum resolving depth and unwind // instead of setting 'resolving' key per type. class DiCircularDependencyError extends ResolvingError { - DiCircularDependencyError(key) : super(key); + DiCircularDependencyError(Key key) : super(key); // strips the cyclical part of the chain. List get stripCycle {