diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-05-06 21:50:26 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-05-06 21:50:26 +0200 |
commit | 538e6dfbb5b1d405e1c763b92a5b2cb77eb3aedd (patch) | |
tree | 08eb25d752d4454c6cdb56db42e622cd679af20c /test/files/neg/t4568.scala | |
parent | 7cac6334d4437ff54c4979799574045501f64135 (diff) | |
download | scala-538e6dfbb5b1d405e1c763b92a5b2cb77eb3aedd.tar.gz scala-538e6dfbb5b1d405e1c763b92a5b2cb77eb3aedd.tar.bz2 scala-538e6dfbb5b1d405e1c763b92a5b2cb77eb3aedd.zip |
Test case closes SI-4568.
What's the opposite of regression? Progression!
Diffstat (limited to 'test/files/neg/t4568.scala')
-rw-r--r-- | test/files/neg/t4568.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t4568.scala b/test/files/neg/t4568.scala new file mode 100644 index 0000000000..8067759262 --- /dev/null +++ b/test/files/neg/t4568.scala @@ -0,0 +1,13 @@ +object SubList { + implicit def sublistable[A](x: List[A]) = new SubListable(x) + + class SubListable[A](x: List[A]) { + def isSubListOf(y: List[A]) = { + x match { + case Nil => true + case h :: t => y.contains(h) && (t.isSubListOf(y.drop(y.indexOf(h) + 1))) + } + } + } + +}
\ No newline at end of file |