aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-31 17:20:02 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-04-08 16:55:56 +0200
commitdd5341106d9b57a99316a26a1f0c7e195b6debf1 (patch)
tree2a555b335e2d661a828014e35e91e308fec4798e /tests/neg
parenteb3df0db4a57d89c0d7370a9180742273db166b2 (diff)
downloaddotty-dd5341106d9b57a99316a26a1f0c7e195b6debf1.tar.gz
dotty-dd5341106d9b57a99316a26a1f0c7e195b6debf1.tar.bz2
dotty-dd5341106d9b57a99316a26a1f0c7e195b6debf1.zip
Fleshed out Splitter phase
Implemented splitting operations As a side effect, this contains a test ruling out structural term member dispatch. Tests 0586 and 0625 which used structural dispatch got moved to neg.
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/t0586.scala9
-rw-r--r--tests/neg/t0625.scala8
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/neg/t0586.scala b/tests/neg/t0586.scala
new file mode 100644
index 000000000..540e225a1
--- /dev/null
+++ b/tests/neg/t0586.scala
@@ -0,0 +1,9 @@
+object RClose {
+ type ReflectCloseable = { def close(): Unit }
+ def withReflectCloseable[T <: ReflectCloseable, R](s: T)(action: T => R): R =
+ try {
+ action(s)
+ } finally {
+ s.close()
+ }
+}
diff --git a/tests/neg/t0625.scala b/tests/neg/t0625.scala
new file mode 100644
index 000000000..561454259
--- /dev/null
+++ b/tests/neg/t0625.scala
@@ -0,0 +1,8 @@
+object Test {
+ def idMap[C[_],T](m: { def map[U](f: T => U): C[U] }): C[T] = m.map(t => t)
+
+ def main(args: Array[String]): Unit = {
+ idMap(Some(5))
+ idMap(Responder.constant(5))
+ }
+}