Skip to content

"Double definition: final def ...$$outer" when compiling with Scala.js (but not with the JVM backend) #10177

Closed
@smarter

Description

@smarter

This is not minimized but can be reproduced in the scalacheck repo, I'm hoping @sjrd can figure out what this is anyway 😅 :

git clone https://github.com/smarter/scalacheck/ -b 3.0.0-M1-and-scalajs
cd scalacheck
sbt "++3.0.0-M1 js/compile"

Output

[...]
[error] -- [E120] Naming Error: /home/smarter/opt/scalacheck/src/main/scala/org/scalacheck/commands/Commands.scala:98:8
[error] 98 |  trait Command {
[error]    |        ^
[error]    |Double definition:
[error]    |final def org$scalacheck$commands$Commands$Command$$$outer
[error]    |  (): org.scalacheck.commands.Commands in class CommandSequence at line 98 and
[error]    |final def org$scalacheck$commands$Commands$Command$$$outer
[error]    |  (): org.scalacheck.commands.Commands in class CommandSequence at line 98
[error]    |have the same type after erasure.
[error] -- [E120] Naming Error: /home/smarter/opt/scalacheck/src/main/scala/org/scalacheck/commands/Commands.scala:137:8
[error] 137 |  trait SuccessCommand extends Command {
[error]     |        ^
[error]     |Double definition:
[error]     |final def org$scalacheck$commands$Commands$SuccessCommand$$$outer
[error]     |  (): org.scalacheck.commands.Commands in class CommandSequence at line 137 and
[error]     |final def org$scalacheck$commands$Commands$SuccessCommand$$$outer
[error]     |  (): org.scalacheck.commands.Commands in class CommandSequence at line 137
[error]     |have the same type after erasure.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions