diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-04-11 14:18:52 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-04-11 22:03:58 +0200 |
commit | 04e32dc5129d140416b0d4a5f05d82352a954a90 (patch) | |
tree | 09e7bc85436b7cfdbfbfaf746e6b3b8f48308144 /src | |
parent | 4ca7208d7dc84b55d5d4cc3e23c42a2816e9b7c5 (diff) | |
download | dotty-04e32dc5129d140416b0d4a5f05d82352a954a90.tar.gz dotty-04e32dc5129d140416b0d4a5f05d82352a954a90.tar.bz2 dotty-04e32dc5129d140416b0d4a5f05d82352a954a90.zip |
Fix mkArityArray not producing last arity
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/Definitions.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index 2d9cd5acf..53e8b4d2c 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -77,8 +77,8 @@ class Definitions { newPolyMethod(cls, name, 1, pt => MethodType(Nil, Nil, resultTypeFn(pt)), flags) private def mkArityArray(name: String, arity: Int, countFrom: Int): Array[ClassSymbol] = { - val arr = new Array[ClassSymbol](arity) - for (i <- countFrom until arity) arr(i) = ctx.requiredClass(name + i) + val arr = new Array[ClassSymbol](arity + 1) + for (i <- countFrom to arity) arr(i) = ctx.requiredClass(name + i) arr } @@ -339,7 +339,7 @@ class Definitions { // ----- Symbol sets --------------------------------------------------- - lazy val AbstractFunctionClass = mkArityArray("runtime.AbstractFunction", MaxFunctionArity, 0) + lazy val AbstractFunctionClass = mkArityArray("scala.runtime.AbstractFunction", MaxFunctionArity, 0) lazy val FunctionClass = mkArityArray("scala.Function", MaxFunctionArity, 0) lazy val TupleClass = mkArityArray("scala.Tuple", MaxTupleArity, 2) lazy val ProductNClass = mkArityArray("scala.Product", MaxTupleArity, 2) |