spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piotr Kołaczkowski (JIRA) <j...@apache.org>
Subject [jira] [Created] (SPARK-1927) Implicits declared in companion objects not found in Spark shell
Date Mon, 26 May 2014 11:42:01 GMT
Piotr Kołaczkowski created SPARK-1927:
-----------------------------------------

             Summary: Implicits declared in companion objects not found in Spark shell
                 Key: SPARK-1927
                 URL: https://issues.apache.org/jira/browse/SPARK-1927
             Project: Spark
          Issue Type: Bug
    Affects Versions: 0.9.0
         Environment: Ubuntu Linux 14.04, Oracle Java 7u55
            Reporter: Piotr Kołaczkowski


{code}
scala> :paste
// Entering paste mode (ctrl-D to finish)

trait Mapper[T]
class Foo
object Foo { implicit object FooMapper extends Mapper[Foo] }

// Exiting paste mode, now interpreting.

defined trait Mapper
defined class Foo
defined module Foo

scala> implicitly[Mapper[Foo]]
<console>:28: error: could not find implicit value for parameter e: Mapper[Foo]
              implicitly[Mapper[Foo]]
                        ^
{code}

Exactly same example in the official Scala REPL (2.10.4):
{code}
scala> :paste
// Entering paste mode (ctrl-D to finish)

trait Mapper[T]
class Foo
object Foo { implicit object FooMapper extends Mapper[Foo] }

// Exiting paste mode, now interpreting.

defined trait Mapper
defined class Foo
defined module Foo

scala> implicitly[Mapper[Foo]]
res0: Mapper[Foo] = Foo$FooMapper$@4a20e9c6
{code}

I guess it might be another manifestation of the problem of everything being an inner object
in Spark Repl. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message