Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-5149

Type mismatch when defining classes in Spark REPL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • None
    • None
    • Spark Shell
    • None

    Description

      Consider the following Spark REPL session:

      scala> class A; def foo(x: A) = x
      defined class A
      foo: (x: A)A
      
      scala> foo(new A)
      <console>:14: error: type mismatch;
       found   : A
       required: A
                    foo(new A)
                        ^
      

      This happens, because of the way the Spark REPL imports previously defined symbols (values / types).

      Attachments

        Issue Links

          Activity

            People

              tobias.schlatter Tobias Schlatter
              tobias.schlatter Tobias Schlatter
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: