Skip to content

crash on compilable code: assertion failed: dotty.tools.dotc.core.Scopes$MutableScope #3702

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
helloqirun opened this issue Dec 27, 2017 · 0 comments

Comments

@helloqirun
Copy link

scalac compiles but dotc crashes.

$ dotc -version

Dotty compiler version 0.5.0-bin-SNAPSHOT-git-4fefb64 -- Copyright 2002-2017, LAMP/EPFL

$ dotc abc.scala

-- [E006] Unbound Identifier Error: abc.scala:5:5 ------------------------------
5 |    @annot class Silly {}
  |     ^^^^^
  |     not found: type annot

longer explanation available when compiling with `-explain`

exception occurred while typechecking abc.scala

exception occurred while compiling abc.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: dotty.tools.dotc.core.Scopes$MutableScope@3c7f66c4
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:39)
	at dotty.tools.dotc.typer.NamerContextOps.denotNamed(Namer.scala:51)
	at dotty.tools.dotc.typer.Typer.loop$1(Typer.scala:271)
	at dotty.tools.dotc.typer.Typer.findRef$1(Typer.scala:334)
	at dotty.tools.dotc.typer.Typer.op$1(Typer.scala:353)
	at dotty.tools.dotc.typer.Typer.typedIdent(Typer.scala:102)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1622)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1689)
	at dotty.tools.dotc.typer.Typer.op$40(Typer.scala:1707)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1703)
	at dotty.tools.dotc.typer.Typer.typedType(Typer.scala:1766)
	at dotty.tools.dotc.typer.Typer.op$6(Typer.scala:475)
	at dotty.tools.dotc.typer.Typer.typedNew(Typer.scala:456)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1645)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1690)
	at dotty.tools.dotc.typer.Typer.op$40(Typer.scala:1707)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1703)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1764)
	at dotty.tools.dotc.typer.Typer.typeSelectOnTerm$1(Typer.scala:397)
<snipped>

$ cat abc.scala

object test {
  class annot extends scala.annotation.Annotation
  def foo = {
    def bar(i: Int): Int = i
    @annot class Silly {}
    bar(5)
  }
}
odersky added a commit that referenced this issue Jan 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant