diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/files/pos/looping-jsig.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/files/pos/looping-jsig.scala')
-rw-r--r-- | test/files/pos/looping-jsig.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/pos/looping-jsig.scala b/test/files/pos/looping-jsig.scala index 6e3313c463..e2d9e76229 100644 --- a/test/files/pos/looping-jsig.scala +++ b/test/files/pos/looping-jsig.scala @@ -1,15 +1,15 @@ import scala.collection.mutable._ trait BugTrack { - trait B[+T] + trait B[+T] val cache : HashMap[A[_], B[_]] = HashMap.empty - def A[T](f: Int => B[T]): A[T] + def A[T](f: Int => B[T]): A[T] = new A[T]{def apply(in: Int) = f(in)} - + abstract class A[+T] extends (Int => B[T]) { def giveMeSame = this - } + } def amethod[T](p: =>A[T]): A[T] = A(in => cache.get(p) match { case Some(res) => res |