diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t0764.check | 2 | ||||
-rw-r--r-- | test/files/neg/t0842.check | 4 | ||||
-rwxr-xr-x | test/files/neg/t0842.scala | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/test/files/neg/t0764.check b/test/files/neg/t0764.check index b622f17c5e..9f0cedc69b 100644 --- a/test/files/neg/t0764.check +++ b/test/files/neg/t0764.check @@ -1,5 +1,5 @@ t0764.scala:13: error: type mismatch; - found : java.lang.Object with Node{type T = _1.type} where val _1: Main.this.AType + found : java.lang.Object with Node{type T = _1.type} where val _1: Node{type T = NextType} required: Node{type T = Main.this.AType} new Main[AType]( (value: AType).prepend ) ^ diff --git a/test/files/neg/t0842.check b/test/files/neg/t0842.check new file mode 100644 index 0000000000..5f88f08194 --- /dev/null +++ b/test/files/neg/t0842.check @@ -0,0 +1,4 @@ +t0842.scala:1: error: A.this.type does not take type parameters +trait A[T] { def m: this.type[T] = this }
+ ^ +one error found diff --git a/test/files/neg/t0842.scala b/test/files/neg/t0842.scala new file mode 100755 index 0000000000..f32c2ba26d --- /dev/null +++ b/test/files/neg/t0842.scala @@ -0,0 +1 @@ +trait A[T] { def m: this.type[T] = this } |