diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-09-10 15:32:07 +0200 |
---|---|---|
committer | Den Shabalin <den.shabalin@gmail.com> | 2013-09-12 12:43:28 +0200 |
commit | 8a7b5666b6f10728f7c3ae9ca1bc2a8b82f6b965 (patch) | |
tree | 3e6ad67c8cba6e23047f991e71f1256e652d25bb /src/reflect/scala/reflect/api/StandardDefinitions.scala | |
parent | 95fe19545d60ae9aa79d2c8d5665c7f3b0cbdb1a (diff) | |
download | scala-8a7b5666b6f10728f7c3ae9ca1bc2a8b82f6b965.tar.gz scala-8a7b5666b6f10728f7c3ae9ca1bc2a8b82f6b965.tar.bz2 scala-8a7b5666b6f10728f7c3ae9ca1bc2a8b82f6b965.zip |
refactor variable arity definitions
Transform current arrays of symbols into function-like objects
that return NoSymbol at all places where corresponding arity isn't
available.
Diffstat (limited to 'src/reflect/scala/reflect/api/StandardDefinitions.scala')
-rw-r--r-- | src/reflect/scala/reflect/api/StandardDefinitions.scala | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/reflect/scala/reflect/api/StandardDefinitions.scala b/src/reflect/scala/reflect/api/StandardDefinitions.scala index bbfebcb434..e255d305f7 100644 --- a/src/reflect/scala/reflect/api/StandardDefinitions.scala +++ b/src/reflect/scala/reflect/api/StandardDefinitions.scala @@ -214,29 +214,35 @@ trait StandardDefinitions { /** The module symbol of module `scala.Some`. */ def SomeModule: ModuleSymbol - /** The array of class symbols for classes `scala.ProductX`. + /** Function-like object that maps arity to symbols for classes `scala.ProductX`. * - 0th element is `Unit` * - 1st element is `Product1` * - ... * - 22nd element is `Product22` + * - 23nd element is `NoSymbol` + * - ... */ - def ProductClass : Array[ClassSymbol] + def ProductClass: Int => Symbol - /** The array of class symbols for classes `scala.FunctionX`. + /** Function-like object that maps arity to symbols for classes `scala.FunctionX`. * - 0th element is `Function0` * - 1st element is `Function1` * - ... * - 22nd element is `Function22` + * - 23nd element is `NoSymbol` + * - ... */ - def FunctionClass : Array[ClassSymbol] + def FunctionClass: Int => Symbol - /** The array of class symbols for classes `scala.TupleX`. + /** Function-like object that maps arity to symbols for classes `scala.TupleX`. * - 0th element is `NoSymbol` * - 1st element is `Product1` * - ... * - 22nd element is `Product22` + * - 23nd element is `NoSymbol` + * - ... */ - def TupleClass: Array[Symbol] // cannot make it Array[ClassSymbol], because TupleClass(0) is supposed to be NoSymbol. weird + def TupleClass: Int => Symbol /** Contains Scala primitive value classes: * - Byte |