summaryrefslogtreecommitdiff
path: root/test/files/neg/bug1275.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2010-08-13 16:21:40 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2010-08-13 16:21:40 +0000
commit9550c2077cc69434a460171ddd021a1de7ca1da4 (patch)
treeb4719a0d8b78eb643ffde773db1209b98b959cf4 /test/files/neg/bug1275.scala
parent29f9d75674205eb8f3db63829eeb1ff7d781694c (diff)
downloadscala-9550c2077cc69434a460171ddd021a1de7ca1da4.tar.gz
scala-9550c2077cc69434a460171ddd021a1de7ca1da4.tar.bz2
scala-9550c2077cc69434a460171ddd021a1de7ca1da4.zip
closes #3419: test files
omit check that wouldn't work with separate compilation, not needed anymore because compiler has become more robust the actual fix was committed as part of r22512, see #3374 also see #3512 no review
Diffstat (limited to 'test/files/neg/bug1275.scala')
-rw-r--r--test/files/neg/bug1275.scala13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/files/neg/bug1275.scala b/test/files/neg/bug1275.scala
index 769156fff2..1175b30763 100644
--- a/test/files/neg/bug1275.scala
+++ b/test/files/neg/bug1275.scala
@@ -1,12 +1,15 @@
object Test {
trait Seq[+t] {
type MyType[+t] <: Seq[t]
+
def f: MyType[t]
}
- def span[a, s <: Seq[a] { type MyType <: s } ](xs: s): s
- = xs f // xs: s <: Seq[a]{type MyType <: s }
- // xs.f : xs.MyType[a] <: Seq[a]
- // ill-formed type in bound for s: Seq[a] { type MyType <: s }
- // refinements aren't checked -- should they?
+ // illegal abstract type member refinement: changes the arity of MyType
+ // the error is pretty strange, since the compiler forms the illegal type xs.MyType[a] anyway
+ def span[a, s <: Seq[a] { type MyType/*look ma, no type parameters!*/ <: s } ](xs: s): s
+ = xs f
+// ^
+// found : xs.MyType[a]
+// required: s
} \ No newline at end of file