diff options
author | Aleksandar Prokopec <axel22@gmail.com> | 2012-06-28 19:48:31 +0200 |
---|---|---|
committer | Aleksandar Prokopec <axel22@gmail.com> | 2012-06-28 19:48:31 +0200 |
commit | b379ff4f59c139ff7d2b77e7e808f0b74aa9f268 (patch) | |
tree | d531663cc08c71cc2631c119403af3032c71b543 /test/scaladoc/resources/implicits-ambiguating-res.scala | |
parent | 2f0d94c02ab328a3f8da25b5ab8f402a68143af3 (diff) | |
parent | 6f08c06a35a0b70c49e23a296b13ac391a460584 (diff) | |
download | scala-b379ff4f59c139ff7d2b77e7e808f0b74aa9f268.tar.gz scala-b379ff4f59c139ff7d2b77e7e808f0b74aa9f268.tar.bz2 scala-b379ff4f59c139ff7d2b77e7e808f0b74aa9f268.zip |
Merge branch 'master' into issue/5846,4597,4027,4112
Conflicts:
src/library/scala/collection/MapLike.scala
src/library/scala/collection/SortedMapLike.scala
Diffstat (limited to 'test/scaladoc/resources/implicits-ambiguating-res.scala')
-rw-r--r-- | test/scaladoc/resources/implicits-ambiguating-res.scala | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/test/scaladoc/resources/implicits-ambiguating-res.scala b/test/scaladoc/resources/implicits-ambiguating-res.scala deleted file mode 100644 index 6ed51366cb..0000000000 --- a/test/scaladoc/resources/implicits-ambiguating-res.scala +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Test scaladoc implicits distinguishing -- supress all members by implicit conversion that are shadowed by the - * class' own members - * - * {{{ - * scala> class A { def foo(t: String) = 4 } - * defined class A - * - * scala> class B { def foo(t: Any) = 5 } - * defined class B - * - * scala> implicit def AtoB(a:A) = new B - * AtoB: (a: A)B - * - * scala> val a = new A - * a: A = A@28f553e3 - * - * scala> a.foo("T") - * res1: Int = 4 - * - * scala> a.foo(4) - * res2: Int = 5 - * }}} - */ -package scala.test.scaladoc.implicits.ambiguating -import language.implicitConversions // according to SIP18 - -/** - conv1-5 should be ambiguous - * - conv6-7 should not be ambiguous - * - conv8 should be ambiguous - * - conv9 should be ambiguous - * - conv10 and conv11 should not be ambiguous */ -class A[T] -/** conv1-9 should be the same, conv10 should be ambiguous, conv11 should be okay */ -class B extends A[Int] -/** conv1-9 should be the same, conv10 and conv11 should not be ambiguous */ -class C extends A[Double] - /** conv1-9 should be the same, conv10 should not be ambiguous while conv11 should be ambiguous */ -class D extends A[AnyRef] - -class X[T] { - def conv1: AnyRef = ??? - def conv2: T = ??? - def conv3(l: Int): AnyRef = ??? - def conv4(l: AnyRef): AnyRef = ??? - def conv5(l: AnyRef): String = ??? - def conv6(l: String)(m: String): AnyRef = ??? - def conv7(l: AnyRef)(m: AnyRef): AnyRef = ??? - def conv8(l: AnyRef): AnyRef = ??? - def conv9(l: String): AnyRef = ??? - def conv10(l: T): T = ??? - def conv11(l: T): T = ??? -} - -class Z[T] { - def conv1: AnyRef = ??? - def conv2: T = ??? - def conv3(p: Int): AnyRef = ??? - def conv4(p: AnyRef): String = ??? - def conv5(p: AnyRef): AnyRef = ??? - def conv6(p: String, q: String): AnyRef = ??? - def conv7(p: AnyRef, q: AnyRef): AnyRef = ??? - def conv8(p: String): AnyRef = ??? - def conv9(p: AnyRef): AnyRef = ??? - def conv10(p: Int): T = ??? - def conv11(p: String): T = ??? -} - -object A { - implicit def AtoX[T](a: A[T]) = new X[T] - implicit def AtoZ[T](a: A[T]) = new Z[T] -} |