Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-25075 Build and test Spark against Scala 2.13
  3. SPARK-29411

Remove use of Unit companion object in favor of ()

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • ML, Spark Core
    • None

    Description

      Scala 2.13 disallows use of the Unit companion object:

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

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

      Attachments

        Issue Links

          Activity

            People

              srowen Sean R. Owen
              srowen Sean R. Owen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: