Closed as not planned
Description
Code:
import scala.scalajs
640D
.js
abstract class A:
type Props
def apply(p: Props) = ()
object B extends A:
case class Props()
def apply(a: js.UndefOr[String]) = ()
https://scastie.scala-lang.org/wIU34JJtTi2xlNfVldcClg
Error:
Name clash between defined and inherited member:
def apply(p: A.this.Props): Unit in class A at line 7 and
def apply(a: scala.scalajs.js.UndefOr[String]): Unit in object B at line 12
have the same type after erasure.
Consider adding a @targetName annotation to one of the conflicting definitions
for disambiguation
Notes:
The following code works suggesting some issue with js.UndefOr:
import scala.scalajs.js
abstract class A:
type Props
def apply(p: Props) = ()
object B extends A:
case class Props()
def apply(a: String) = ()
Versions Tested:
3.3.6, 3.7.0.