Skip to content

dotr (REPL) empty extension assertion error #8717

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
kpbochenek opened this issue Apr 13, 2020 · 0 comments · Fixed by #8720
Closed

dotr (REPL) empty extension assertion error #8717

kpbochenek opened this issue Apr 13, 2020 · 0 comments · Fixed by #8720

Comments

@kpbochenek
Copy link
Contributor

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.

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 14, 2020
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 14, 2020
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 14, 2020
@nicolasstucki nicolasstucki self-assigned this Apr 14, 2020
@nicolasstucki nicolasstucki linked a pull request Apr 14, 2020 that will close this issue
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Apr 14, 2020
nicolasstucki added a commit that referenced this issue Apr 15, 2020
Fix #8716 and fix #8717: Add missing extension span
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants