Closed
Description
Minimized example
scala> extension { }
Output
Exception in thread "main" java.lang.AssertionError: assertion failed
at dotty.DottyPredef$.assertFail(DottyPredef.scala:16)
at dotty.tools.dotc.util.Spans$Span$.end$extension(Spans.scala:50)
at dotty.tools.repl.ReplCompiler.compile(ReplCompiler.scala:165)
at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:229)
at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:193)
at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:127)
at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:130)
at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:148)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:130)
at dotty.tools.repl.Main$.main(Main.scala:6)
at dotty.tools.repl.Main.main(Main.scala)
(and REPL terminates)
Expectation
Error similar to the one generated from compiler:
anonymous instance must implement a type or have at least one extension method
and REPL not terminating.