diff --git a/compiler/src/dotty/tools/dotc/sbt/package.scala b/compiler/src/dotty/tools/dotc/sbt/package.scala index 379a2e45ce40..7c24319005ed 100644 --- a/compiler/src/dotty/tools/dotc/sbt/package.scala +++ b/compiler/src/dotty/tools/dotc/sbt/package.scala @@ -12,7 +12,7 @@ inline val InlineParamHash = 1997 // 302nd prime extension (sym: Symbol) def constructorName(using Context) = - sym.owner.fullName ++ ";init;" + sym.owner.name ++ ";init;" /** Mangle a JVM symbol name in a format better suited for internal uses by sbt. */ def zincMangledName(using Context): Name = diff --git a/sbt-test/source-dependencies/constructors/A.scala b/sbt-test/source-dependencies/constructors/A.scala index b81025bada4d..0c5a5efa5b25 100644 --- a/sbt-test/source-dependencies/constructors/A.scala +++ b/sbt-test/source-dependencies/constructors/A.scala @@ -1 +1,3 @@ +package example + class A(a: Int) diff --git a/sbt-test/source-dependencies/constructors/B.scala b/sbt-test/source-dependencies/constructors/B.scala index e44b1d4c7852..b66f04320f13 100644 --- a/sbt-test/source-dependencies/constructors/B.scala +++ b/sbt-test/source-dependencies/constructors/B.scala @@ -1 +1,3 @@ +package example + class B { val y = new A(2) } diff --git a/sbt-test/source-dependencies/constructors/changes/A2.scala b/sbt-test/source-dependencies/constructors/changes/A2.scala index edd9e160e7bf..5f72892e6f26 100644 --- a/sbt-test/source-dependencies/constructors/changes/A2.scala +++ b/sbt-test/source-dependencies/constructors/changes/A2.scala @@ -1 +1,3 @@ +package example + class A(a: String) diff --git a/sbt-test/source-dependencies/constructors/changes/B2.scala b/sbt-test/source-dependencies/constructors/changes/B2.scala index 701f0514685f..7b1399a8ac49 100644 --- a/sbt-test/source-dependencies/constructors/changes/B2.scala +++ b/sbt-test/source-dependencies/constructors/changes/B2.scala @@ -1 +1,3 @@ +package example + class B { val y = new A("a") }