summaryrefslogtreecommitdiff
path: root/test/files/pos/t4070b.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-06 14:48:28 -0800
committerPaul Phillips <paulp@improving.org>2012-01-06 15:33:13 -0800
commitf39537a369e3b137f5b1bef21cc8f5d86bc9d9d8 (patch)
treec655fb315741d30c59594b0f6a4758898ec89d70 /test/files/pos/t4070b.scala
parentdd14b6a9b8b3355fae847f7fc8c1fc7d41babaa5 (diff)
downloadscala-f39537a369e3b137f5b1bef21cc8f5d86bc9d9d8.tar.gz
scala-f39537a369e3b137f5b1bef21cc8f5d86bc9d9d8.tar.bz2
scala-f39537a369e3b137f5b1bef21cc8f5d86bc9d9d8.zip
Fix for crasher during type inference.
Well, "fix" is pretty generous, how about "workaround". It does seem to do the job. Closes SI-4070, review by @moors.
Diffstat (limited to 'test/files/pos/t4070b.scala')
-rw-r--r--test/files/pos/t4070b.scala35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/files/pos/t4070b.scala b/test/files/pos/t4070b.scala
new file mode 100644
index 0000000000..36d03de80c
--- /dev/null
+++ b/test/files/pos/t4070b.scala
@@ -0,0 +1,35 @@
+package a {
+ abstract class DeliteOp[B]
+ abstract class DeliteCollection[A]
+ abstract class Exp[T] { def Type: T }
+
+ trait DeliteOpMap[A,B,C[X] <: DeliteCollection[X]] extends DeliteOp[C[B]] {
+ val in: Exp[C[A]]
+ val func: Exp[B]
+ val alloc: Exp[C[B]]
+ }
+
+ object Test {
+ def f(x: DeliteOp[_]) = x match {
+ case map: DeliteOpMap[_,_,_] => map.alloc.Type
+ }
+ }
+}
+
+package b {
+ object Test {
+ def f(x: DeliteOp[_]) = x match {
+ case map: DeliteOpMap[_,_,_] => map.alloc.Type
+ }
+ }
+
+ abstract class DeliteOp[B]
+ abstract class DeliteCollection[A]
+ abstract class Exp[T] { def Type: T }
+
+ trait DeliteOpMap[A,B,C[X] <: DeliteCollection[X]] extends DeliteOp[C[B]] {
+ val in: Exp[C[A]]
+ val func: Exp[B]
+ val alloc: Exp[C[B]]
+ }
+} \ No newline at end of file