-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion failed "class defined twice" with testCompilation #20296
Comments
Fails Ycheck after checking t/Test.scala after phase MegaPhase{dropOuterAccessors, checkNoSuperThis, flatten, transformWildcards, moveStatic, expandPrivate, restoreScopes, selectStatic, Collect entry points, collectSuperCalls, repeatableAnnotations}
checking t/Test.scala after phase genSJSIR
java.lang.AssertionError: assertion failed: class defined twice class Schema$_$InlinedSchema 6090 7121
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at dotty.tools.dotc.transform.TreeChecker.testDuplicate(TreeChecker.scala:55)
at dotty.tools.dotc.transform.TreeChecker.transformSym(TreeChecker.scala:78)
at dotty.tools.dotc.core.DenotTransformers$SymTransformer.transform(DenotTransformers.scala:72) |
Minimizationtrait Foo
object Foo {
inline def bar(): Foo =
class InlinedFoo extends Foo {}
new InlinedFoo
inline def foo(): Foo =
bar()
class InlinedFoo extends Foo {}
new InlinedFoo
def Test: Foo = Foo.foo()
} |
@sjrd could you check if this is an issue with |
Something really weird is happening here. Moreover, Does that mean there's something side-effecting about |
…alajs`. This works around the issue seen in scala#20296. However, the issue resurfaces if we actually run `-Ycheck:all` in a Scala.js-enabled build.
…alajs`. This works around the issue seen in scala#20296. However, the issue resurfaces if we actually run `-Ycheck:all` in a Scala.js-enabled build.
…alajs`. This works around the issue seen in scala#20296. However, the issue resurfaces if we actually run `-Ycheck:all` in a Scala.js-enabled build.
Compiler version
3.4.2-RC1
Minimized code
$sbt testCompilation tests/pos/shared-classname.scala
. Does not fail withscalac tests/pos/shared-classname.scala
.(shortened version of not-looping-implicit.scala with the anonymous classes given the same name).
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: