You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean R. Owen (Jira)" <ji...@apache.org> on 2019/10/09 14:26:00 UTC

[jira] [Created] (SPARK-29411) Remove use of Unit companion object in favor of ()

Sean R. Owen created SPARK-29411:
------------------------------------

             Summary: Remove use of Unit companion object in favor of ()
                 Key: SPARK-29411
                 URL: https://issues.apache.org/jira/browse/SPARK-29411
             Project: Spark
          Issue Type: Sub-task
          Components: ML, Spark Core
    Affects Versions: 3.0.0
            Reporter: Sean R. Owen
            Assignee: Sean R. Owen


Scala 2.13 disallows use of the {{Unit}} companion object:

{code}
scala> val bar = (i:Int) => Unit
                            ^
       error: `Unit` companion object is not allowed in source; instead, use `()` for the unit value
{code}

In these cases, where it's used to mean _the_ Unit object, just use {{()}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org