diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-01-22 06:21:17 -0800 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-01-22 06:21:17 -0800 |
commit | e9d45980abd7d99abb5a59348deb83954cfd983c (patch) | |
tree | 27785d4d1bbb547fd0f46f1565f7e37e3ff4cc8b /test/files/run | |
parent | 115cd16aca35c8b4000b86f4affd4df243202fd2 (diff) | |
parent | ca74550416049f106e4770edba70be918d674d7f (diff) | |
download | scala-e9d45980abd7d99abb5a59348deb83954cfd983c.tar.gz scala-e9d45980abd7d99abb5a59348deb83954cfd983c.tar.bz2 scala-e9d45980abd7d99abb5a59348deb83954cfd983c.zip |
Merge pull request #3398 from densh/topic/var-arity-class-seq
Expose seq field for variable arity definitions
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/var-arity-class-symbol.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/var-arity-class-symbol.scala b/test/files/run/var-arity-class-symbol.scala new file mode 100644 index 0000000000..29fe960eb3 --- /dev/null +++ b/test/files/run/var-arity-class-symbol.scala @@ -0,0 +1,19 @@ +import scala.reflect.runtime.universe._, definitions._ +object Test extends App { + // Tuples + assert(TupleClass.seq.size == 22) + assert(TupleClass(0) == NoSymbol) + assert(TupleClass(23) == NoSymbol) + assert((1 to 22).forall { i => TupleClass(i).name.toString == s"Tuple$i" }) + // Functions + assert(FunctionClass.seq.size == 23) + assert(FunctionClass(-1) == NoSymbol) + assert(FunctionClass(23) == NoSymbol) + assert((0 to 22).forall { i => FunctionClass(i).name.toString == s"Function$i" }) + // Products + assert(ProductClass.seq.size == 23) + assert(ProductClass(-1) == NoSymbol) + assert(ProductClass(0) == UnitClass) + assert(ProductClass(23) == NoSymbol) + assert((1 to 22).forall { i => ProductClass(i).name.toString == s"Product$i" }) +} |