Skip to content

Unit JS default param makes compiler crash with "Found a dangling UndefinedParam" #4684

Closed
@armanbilge

Description

@armanbilge
//> using scala "2.13.8"
//> using platform "js"

package foo

import scala.scalajs.js

@js.native
trait Bar extends js.Object {
  protected[foo] def baz(
    dummy: Unit = js.native,
  ): Unit = js.native
}

object App {

  def bar: Bar = ???

  def main = bar.baz()

}
[error] ./bug.scala:15:1: Found a dangling UndefinedParam at Position(file:/workspace/sandbox/bug.scala,18,17). This is likely due to a bad interaction between a macro or a compiler plugin and the Scala.js compiler plugin. If you hit this, please let us know.

Scala 3 sibling issue:

Metadata

Metadata

Assignees

Labels

bugConfirmed bug. Needs to be fixed.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions