Skip to content

Predef.conforms chosen in preference to a locally defined implicit function for type (Int => Int) [2.8.0 regression] #2811

Closed
@scabug

Description

@scabug

As discovered by Alexander: http://old.nabble.com/Puzzle-td26827682.html

Welcome to Scala version 2.7.5.final (Java HotSpot(TM) Client VM, Java 1.6.0_14)
.
Type in expressions to have them evaluated.
Type :help for more information.

scala> implicit def s2s(s: String) = "s2s"
s2s: (String)java.lang.String

scala> def implicitly[A](implicit a: A) = a
implicitly: [A](implicit A)A

scala> implicitly[String => String].apply("foo")
res1: String = s2s


E:\tools\scala-2.8.0.latest\bin>.\scala
Welcome to Scala version 2.8.0.r20024-b20091207020224 (Java HotSpot(TM) Client VM, Java 1.6.0_14).
Type in expressions to have them evaluated.
Type :help for more information.

scala> implicit def s2s(s: String) = "s2s"
s2s: (s: String)java.lang.String

scala> implicitly[String => String].apply("foo")
res0: String = foo

scala> implicitly[String => String].getClass
res4: java.lang.Class[_] = class scala.Predef$$$$anon$$1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions