Skip to content

Commit

Permalink
Bring back isImplClass check
Browse files Browse the repository at this point in the history
  • Loading branch information
errikos committed Aug 20, 2020
1 parent f23e82c commit 9717b6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -39,7 +39,7 @@ trait NirGenName { self: NirGenPhase =>
genTypeName(sym.moduleClass)
case _ =>
val idWithSuffix =
if (sym.isModuleClass) {
if (sym.isModuleClass && !isImplClass(sym)) {
id + "$"
} else {
id
Expand Down
Expand Up @@ -4,15 +4,17 @@ import org.scalatest._
import scalanative.util.Platform.scalaVersion
import scalanative.nir.{Type, Sig, Global}

// import scala.scalanative.buildinfo.ScalaNativeBuildInfo.scalaVersion

class TraitReachabilitySuite extends ReachabilitySuite {
val Parent = g("Parent")

// Scala 2.11.x
val ParentClass = g("Parent$class$")
val ParentClass = g("Parent$class")
val ParentClassInit =
g("Parent$class$", Sig.Method("$init$", Seq(Type.Ref(Parent), Type.Unit)))
g("Parent$class", Sig.Method("$init$", Seq(Type.Ref(Parent), Type.Unit)))
val ParentClassFoo =
g("Parent$class$", Sig.Method("foo", Seq(Type.Ref(Parent), Type.Unit)))
g("Parent$class", Sig.Method("foo", Seq(Type.Ref(Parent), Type.Unit)))

// Scala 2.12.x
val ParentInit =
Expand Down

0 comments on commit 9717b6c

Please sign in to comment.