You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name clash between defined and inherited member:
defapply(p: A.this.Props):Unit in classA at line 7 and
defapply(a: scala.scalajs.js.UndefOr[String]):Unit in objectB at line 12
have the same typeafter 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:
That's a specified limitation of Scala. You can't have two methods that are overloaded, but that erase to the same type. Props and js.UndefOr both erase to Object, so that's not allowed. It worked with String because it erases to String, not Object.
Uh oh!
There was an error while loading. Please reload this page.
Code:
https://scastie.scala-lang.org/wIU34JJtTi2xlNfVldcClg
Error:
Notes:
The following code works suggesting some issue with js.UndefOr:
Versions Tested:
3.3.6, 3.7.0.
The text was updated successfully, but these errors were encountered: