Permalink
Browse files

Merge pull request #87 from bysse/master

Added a default, throwing, case to ConstructorInjectionPoint

Triggered by constructors with more than 10 arguments.
  • Loading branch information...
2 parents ee87749 + 8dacf72 commit 4205e4e4376f6769834399bc8159dfa62d04860e @tschneidereit committed Mar 22, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/org/swiftsuspenders/typedescriptions/ConstructorInjectionPoint.as
View
3 src/org/swiftsuspenders/typedescriptions/ConstructorInjectionPoint.as
@@ -37,9 +37,10 @@ package org.swiftsuspenders.typedescriptions
case 8 : result = new type(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]); break;
case 9 : result = new type(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]); break;
case 10 : result = new type(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9]); break;
+ default: throw new Error("The constructor for " + type + " has too many arguments, maximum is 10");
}
p.length = 0;
return result;
}
}
-}
+}

0 comments on commit 4205e4e

Please sign in to comment.