You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Piotr Kołaczkowski (JIRA)" <ji...@apache.org> on 2014/05/26 13:42:01 UTC
[jira] [Created] (SPARK-1927) Implicits declared in companion
objects not found in Spark shell
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)