diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-04-06 09:39:53 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-04-06 09:39:53 +0000 |
commit | f96b6beefc08f56218ac68b37a4cecd757cb60ee (patch) | |
tree | 2001a44efae7ddd1699520d3855598ef13e30803 /test/files/pos/typealiases.scala | |
parent | 10a651a13c323366223160bfa1b4fe8a6e818d1d (diff) | |
download | scala-f96b6beefc08f56218ac68b37a4cecd757cb60ee.tar.gz scala-f96b6beefc08f56218ac68b37a4cecd757cb60ee.tar.bz2 scala-f96b6beefc08f56218ac68b37a4cecd757cb60ee.zip |
adding test files from tcpoly branch without hi...
adding test files from tcpoly branch without history -- much faster this way, sorry
Diffstat (limited to 'test/files/pos/typealiases.scala')
-rw-r--r-- | test/files/pos/typealiases.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/typealiases.scala b/test/files/pos/typealiases.scala new file mode 100644 index 0000000000..c32a3e3a78 --- /dev/null +++ b/test/files/pos/typealiases.scala @@ -0,0 +1,20 @@ +package foo + +trait Test[T] { + type Check[T] = Array[T] => Unit; + type MyPair[S] = Pair[T, S] + + val pair1: Pair[T, Int] + val pair: MyPair[Int] = pair1 + + def check(xs: Array[T], c: Check[T]) = c(xs) + def check2[S](xs: Array[S], c: Check[S]) = c(xs) +} + +object main extends Test[Int] { + val pair1 = (1,1) + + implicit def topair(x: Int): Pair[Int, Int] = (x,x) + val pair2: MyPair[Int] = 1 + val x: short = 1 +}
\ No newline at end of file |