diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2011-03-20 03:02:15 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2011-03-20 03:02:15 +0000 |
commit | ea94126e2dd5aa62d54ca894a785b1814c432441 (patch) | |
tree | cf51dd730619920806a8338eb115e447ddcec5a5 /test/files/pos | |
parent | 1ca657a0a8e2c1d378b6344b1961042bc126e97e (diff) | |
download | scala-ea94126e2dd5aa62d54ca894a785b1814c432441.tar.gz scala-ea94126e2dd5aa62d54ca894a785b1814c432441.tar.bz2 scala-ea94126e2dd5aa62d54ca894a785b1814c432441.zip |
Merged revisions 24504-24516 via svnmerge from
https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk
........
r24504 | extempore | 2011-03-19 01:31:59 +0100 (Sat, 19 Mar 2011) | 4 lines
rytz's patch for making our crazy long names a bit less crazy. You
can now use -Xmax-classfile-name to limit your filenames to as few as
72 characters. Watch out, nanotube gardens, we'll be stepping on your
tiny flowers before you know it. No review. ........ r24505 | kzys |
2011-03-19 13:14:14 +0100 (Sat, 19 Mar 2011) | 2 lines
[scaladoc] Closes #4361.
........
r24506 | kzys | 2011-03-19 14:02:35 +0100 (Sat, 19 Mar 2011) | 2 lines
[scaladoc] Closes #4357. Review by dubochet.
........
r24507 | extempore | 2011-03-19 16:27:01 +0100 (Sat, 19 Mar 2011) | 3 lines
A couple more minor tweaks to power mode, and more importantly, fix
for a jline NPE provoked if your classloaders loaded classes in a
way other than it expected. No review. ........ r24508 | extempore |
2011-03-19 16:27:19 +0100 (Sat, 19 Mar 2011) | 4 lines
Some boundary conditions in range. Also bit the bullet on getting
infix implicits to Integral and Fractional. As a bonus this patch
knocked 10,000 long boxings off a specialized test. Who knew. Closes
#4308, #4321, review by community. ........ r24509 | extempore |
2011-03-19 16:38:06 +0100 (Sat, 19 Mar 2011) | 1 line
Added a :type command to the repl, no review.
........
r24510 | extempore | 2011-03-19 18:32:37 +0100 (Sat, 19 Mar 2011) | 10 lines
Removed long deprecated and obscure CloneableCollection. Discovered
we have a scala.collection.mutable.Cloneable which does not extend
java.lang.Cloneable, which is why Array is not considered cloneable.
That seems wrong, but to be conservative I gave Array the Cloneable
interface without altering the scala trait.
Also, if @serializable is deprecated in favor of Serializable,
should not @cloneable be deprecated analogously? Closes #4307, and a
commit-question review by rytz. ........ r24511 | extempore | 2011-03-19
19:12:17 +0100 (Sat, 19 Mar 2011) | 2 lines
Fix for crasher with Class objects. Code by moors, comment by
extempore. References #4305, no review. ........ r24512 | extempore |
2011-03-19 20:55:42 +0100 (Sat, 19 Mar 2011) | 3 lines
Prevent a divergent implicit from terminating implicit search, so
that there can still be a winner, as endorsed by martin over a cheese
plate. Closes #3883, review by dmharrah. ........ r24513 | extempore |
2011-03-19 20:55:59 +0100 (Sat, 19 Mar 2011) | 3 lines
I'm going to assume the patch I dropped off five months ago for #3938
was merely overlooked. Fixes an issue with java types which extend inner
classes. Closes #3938, review by odersky. ........ r24514 | extempore |
2011-03-19 21:20:17 +0100 (Sat, 19 Mar 2011) | 1 line
Fix for a slice related array view regression. Closes #4352, no
review. ........ r24515 | extempore | 2011-03-19 21:29:02 +0100 (Sat, 19
Mar 2011) | 2 lines
Oh yeah, now I remember why I started with length overrides. Fix
for soon to be failing test, no review. ........ r24516 | extempore |
2011-03-20 00:20:19 +0100 (Sun, 20 Mar 2011) | 2 lines
Fix for a big bug in lastIndexOfSlice and some latent negative index
bugs in both that and indexOfSlice. This stuff is taxing. Closes #4348,
no review. ........
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/array-interfaces.scala | 9 | ||||
-rw-r--r-- | test/files/pos/bug3883.scala | 15 | ||||
-rw-r--r-- | test/files/pos/bug4305.scala | 31 | ||||
-rw-r--r-- | test/files/pos/implicit-infix-ops.scala | 16 |
4 files changed, 71 insertions, 0 deletions
diff --git a/test/files/pos/array-interfaces.scala b/test/files/pos/array-interfaces.scala new file mode 100644 index 0000000000..70cafd2bb1 --- /dev/null +++ b/test/files/pos/array-interfaces.scala @@ -0,0 +1,9 @@ +object s { + def f(x: Cloneable) = () + def g(x: java.io.Serializable) = () + + def main(args: Array[String]): Unit = { + f(args) + g(args) + } +}
\ No newline at end of file diff --git a/test/files/pos/bug3883.scala b/test/files/pos/bug3883.scala new file mode 100644 index 0000000000..adde0526b2 --- /dev/null +++ b/test/files/pos/bug3883.scala @@ -0,0 +1,15 @@ +// need to test both orders +object A1 { + implicit def i: Equiv[Boolean] = error("") + implicit def div[T, A](implicit f: T => A, eq: Equiv[A]): Equiv[T] = error("") + + implicitly[Equiv[Boolean]] +} + +object A2 { + implicit def div[T, A](implicit f: T => A, eq: Equiv[A]): Equiv[T] = error("") + implicit def i: Equiv[Boolean] = error("") + + implicitly[Equiv[Boolean]] +} + diff --git a/test/files/pos/bug4305.scala b/test/files/pos/bug4305.scala new file mode 100644 index 0000000000..ba3eb65bc1 --- /dev/null +++ b/test/files/pos/bug4305.scala @@ -0,0 +1,31 @@ +object T1 { + trait T[A] + class C extends T[String] + object Test { + def main(args: Array[String]): Unit = { + classOf[C].getTypeParameters + } + } +} + +object T2 { + trait T[A] + class C extends T[String] + object Test { + def main(args: Array[String]): Unit = { + val x = classOf[C] + x.getTypeParameters + } + } +} + +object T3 { + trait T[A] + class C extends T[String] + object Test { + def main(args: Array[String]): Unit = { + val x: Class[C] = classOf[C] + x.getTypeParameters + } + } +}
\ No newline at end of file diff --git a/test/files/pos/implicit-infix-ops.scala b/test/files/pos/implicit-infix-ops.scala index ef4512fa6b..66f3718e86 100644 --- a/test/files/pos/implicit-infix-ops.scala +++ b/test/files/pos/implicit-infix-ops.scala @@ -5,3 +5,19 @@ object Test { def f1[T: Numeric](x: T, y: T, z: T) = x + y + z def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) } + +object Int { + import Ordering.Implicits._ + import math.Integral.Implicits._ + + def f1[T: Integral](x: T, y: T, z: T) = (x + y + z) / z + def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) +} + +object Frac { + import Ordering.Implicits._ + import math.Fractional.Implicits._ + + def f1[T: Fractional](x: T, y: T, z: T) = (x + y + z) / z + def f2[T: Ordering](x: T, y: T, z: T) = if (x < y) (z > y) else (x < z) +}
\ No newline at end of file |