Skip to content

Question about method '+=' on ArrayBuilder[Unit] #9132

Closed
@FabioPinheiro

Description

@FabioPinheiro

Minimized example

scala.collection.mutable.ArrayBuilder.make[Unit] += ()

Output

Compiles on Scala 2.13.2 but not on Dotty

scala> scala.collection.mutable.ArrayBuilder.make[Unit] += ()                                                         
1 |scala.collection.mutable.ArrayBuilder.make[Unit] += ()
  |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |None of the overloaded alternatives of method += in trait Growable with types
  | (elem1: Unit, elem2: Unit, elems: Unit*): 
  |  scala.collection.mutable.ArrayBuilder[Unit]
  | (elem: Unit): scala.collection.mutable.ArrayBuilder[Unit]
  |match arguments ()

Expectation

Created this issue so we can officialize if this is the intended behavior or not. In order to see what to do on scala-js/scala-js#4071

The discussion starts Gitter where @smarter and @sjrd participated
https://gitter.im/lampepfl/dotty?at=5ede17109da05a060a5b9b14

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions