summaryrefslogtreecommitdiff
path: root/test/files/neg/structural.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-19 10:22:22 -0700
committerPaul Phillips <paulp@improving.org>2012-09-19 10:27:23 -0700
commitbeb08c206b24e00167a11ea13d1cd998b8e3b067 (patch)
tree1bde617daddd0206fd512904c3f15a02dd801b4b /test/files/neg/structural.check
parent8c69f4da333f17290da26c3951fa9c8805014e47 (diff)
downloadscala-beb08c206b24e00167a11ea13d1cd998b8e3b067.tar.gz
scala-beb08c206b24e00167a11ea13d1cd998b8e3b067.tar.bz2
scala-beb08c206b24e00167a11ea13d1cd998b8e3b067.zip
Error message improvement for SI-6336.
Position error messages about structural type members at the problematic parameter or type.
Diffstat (limited to 'test/files/neg/structural.check')
-rw-r--r--test/files/neg/structural.check18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/files/neg/structural.check b/test/files/neg/structural.check
index 6ef57db1b4..5b2f352a76 100644
--- a/test/files/neg/structural.check
+++ b/test/files/neg/structural.check
@@ -1,28 +1,28 @@
structural.scala:47: error: Parameter type in structural refinement may not refer to the type of that refinement (self type)
val s1 = new { def f(p: this.type): Unit = () }
- ^
+ ^
structural.scala:10: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
def f1[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: A): Object; val x: A }) = x.m[Tata](x.x) //fail
- ^
+ ^
structural.scala:11: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
def f2[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: B): Object; val x: B }) = x.m[Tata](x.x) //fail
- ^
+ ^
structural.scala:12: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
def f3[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: C): Object; val x: C }) = x.m[Tata](x.x) //fail
- ^
+ ^
structural.scala:13: error: Parameter type in structural refinement may not refer to a type member of that refinement
def f4[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: D): Object; val x: D }) = x.m[Tata](x.x) //fail
- ^
+ ^
structural.scala:42: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
type Summable[T] = { def +(v : T) : T }
- ^
+ ^
structural.scala:46: error: Parameter type in structural refinement may not refer to the type of that refinement (self type)
type S1 = { def f(p: this.type): Unit }
- ^
+ ^
structural.scala:49: error: Parameter type in structural refinement may not refer to a type member of that refinement
type S2 = { type T; def f(p: T): Unit }
- ^
+ ^
structural.scala:52: error: Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
def s3[U >: Null <: Object](p: { def f(p: U): Unit; def u: U }) = ()
- ^
+ ^
9 errors found