Skip to content

REPL crashes at completion after BigInt ("assertion failed: missing implicit parameter") #16551

@ansvonwa

Description

@ansvonwa

Compiler version

3.2.1, 3.2.2-RC1-bin-20221017-b88aa12-NIGHTLY-git-b88aa12, but not 3.2.0

Minimized code

scala> BigInt(1).<tab>

Output (click arrow to expand)

Welcome to Scala 3.2.2-RC1-bin-20221017-b88aa12-NIGHTLY-git-b88aa12 (11.0.17, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                                        
scala> BigInt(1).<tab>
Exception in thread "main" java.lang.AssertionError: assertion failed: missing implicit parameter of type Ordering[BigInt] after typer at phase parser
	at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:1009)
	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:811)
	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:121)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:877)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:811)
	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:121)
	at dotty.tools.dotc.typer.Typer.implicitArgs$1(Typer.scala:3525)
	at dotty.tools.dotc.typer.Typer.addImplicitArgs$1(Typer.scala:3561)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsImplicitMethod$1(Typer.scala:3637)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3825)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4068)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3403)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3022)
	at dotty.tools.dotc.typer.Implicits.tryConversion$1(Implicits.scala:1103)
	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1134)
	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:811)
	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:121)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1206)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.$anonfun$9(Implicits.scala:1544)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.allImplicits(Implicits.scala:1544)
	at dotty.tools.dotc.interactive.Completion$Completer.implicitConversionTargets(Completion.scala:513)
	at dotty.tools.dotc.interactive.Completion$Completer.implicitConversionMemberCompletions(Completion.scala:378)
	at dotty.tools.dotc.interactive.Completion$Completer.selectionCompletions(Completion.scala:320)
	at dotty.tools.dotc.interactive.Completion$.computeCompletions(Completion.scala:143)
	at dotty.tools.dotc.interactive.Completion$.completions(Completion.scala:48)
	at dotty.tools.repl.ReplDriver.completions$$anonfun$1(ReplDriver.scala:239)
	at scala.util.Either.map(Either.scala:382)
	at dotty.tools.repl.ReplDriver.completions(ReplDriver.scala:240)
	at dotty.tools.repl.ReplDriver.$anonfun$1(ReplDriver.scala:151)
	at org.jline.reader.impl.LineReaderImpl.doComplete(LineReaderImpl.java:4412)
	at org.jline.reader.impl.LineReaderImpl.doComplete(LineReaderImpl.java:4378)
	at org.jline.reader.impl.LineReaderImpl.expandOrComplete(LineReaderImpl.java:4317)
	at org.jline.reader.impl.LineReaderImpl$1.apply(LineReaderImpl.java:3809)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:679)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:468)
	at dotty.tools.repl.JLineTerminal.readLine(JLineTerminal.scala:74)
	at dotty.tools.repl.ReplDriver.readLine$1(ReplDriver.scala:156)
	at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:166)
	at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:171)
	at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:191)
	at dotty.tools.repl.ReplDriver.runBody$$anonfun$1(ReplDriver.scala:179)
	at dotty.tools.runner.ScalaClassLoader$.asContext(ScalaClassLoader.scala:80)
	at dotty.tools.repl.ReplDriver.runBody(ReplDriver.scala:179)
	at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:171)
	at dotty.tools.repl.ReplDriver.tryRunning(ReplDriver.scala:133)
	at dotty.tools.repl.Main$.main(Main.scala:7)
	at dotty.tools.repl.Main.main(Main.scala)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions