Skip to content

Throwable trait inside of another trait fails with an assertion error. #6054

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

Closed
sir-wabbit opened this issue Mar 9, 2019 · 0 comments
Closed

Comments

@sir-wabbit
Copy link

trait i0 {
  trait i1 extends Throwable { false }
}
trait i0 {
  trait I1 extends Throwable { val I1 = () } 
}

AE-594286f761bd42e1a08dcf622a50ff3015c0b113


exception occurred while compiling test.scala
java.lang.AssertionError: assertion failed: asTerm called on not-a-Term val <none> while compiling test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: asTerm called on not-a-Term val <none>
	at scala.Predef$.assert(Predef.scala:223)
	at dotty.tools.dotc.core.Symbols$Symbol.asTerm(Symbols.scala:520)
	at dotty.tools.dotc.ast.tpd$.New(tpd.scala:438)
	at dotty.tools.dotc.transform.ExplicitOuter.$anonfun$transformTemplate$4(ExplicitOuter.scala:108)
	at scala.collection.immutable.List.map(List.scala:286)
	at dotty.tools.dotc.transform.ExplicitOuter.transformTemplate(ExplicitOuter.scala:102)
	at dotty.tools.dotc.transform.MegaPhase.goTemplate(MegaPhase.scala:971)
	at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:340)
	at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:396)
	at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:251)
	at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:394)
	at dotty.tools.dotc.transform.MegaPhase.transformStat$1(MegaPhase.scala:404)
	at dotty.tools.dotc.transform.MegaPhase.$anonfun$transformStats$2(MegaPhase.scala:409)
	at scala.collection.immutable.List.mapConserve(List.scala:179)
odersky added a commit to dotty-staging/dotty that referenced this issue Mar 10, 2019
odersky added a commit that referenced this issue Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants