diff options
author | Martin Odersky <odersky@gmail.com> | 2008-07-28 10:00:31 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-07-28 10:00:31 +0000 |
commit | d492b489b176a3d2a4da0d199756af86514be352 (patch) | |
tree | e5cf7bedfa037a03f0fbf1bb72564114473edef0 /test/files | |
parent | c8b3af98b9dd45a358332f60e3bc8f5b8b3c604a (diff) | |
download | scala-d492b489b176a3d2a4da0d199756af86514be352.tar.gz scala-d492b489b176a3d2a4da0d199756af86514be352.tar.bz2 scala-d492b489b176a3d2a4da0d199756af86514be352.zip |
fixed #842, #945, #83, #996, #1016, + some perf...
fixed #842, #945, #83, #996, #1016, + some performace tuning.
Diffstat (limited to 'test/files')
-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 | ||||
-rwxr-xr-x | test/files/pos/t0872.scala | 8 |
4 files changed, 14 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 } diff --git a/test/files/pos/t0872.scala b/test/files/pos/t0872.scala new file mode 100755 index 0000000000..8f4c1c4436 --- /dev/null +++ b/test/files/pos/t0872.scala @@ -0,0 +1,8 @@ +object Main { + def main(args : Array[String]) { + val fn = (a : Int, str : String) => "a: " + a + ", str: " + str + implicit def fx[T](f : (T,String) => String) = (x:T) => f(x,null) + println(fn(1)) + () + } +} |