Skip to content

REPL crashes on code completion for a subtype of Selectable #16360

Closed
@prolativ

Description

@prolativ

Compiler version

Crashes in 3.2.1 and nightly (3.3.0-RC1-bin-20221115-e587a81-NIGHTLY)
There was no crash in 3.2.0

Minimized code

class Foo extends Selectable
val x = (new Foo).<TAB>

Output (click arrow to expand)

Exception in thread "main" java.lang.AssertionError: assertion failed: missing implicit parameter of type languageFeature.reflectiveCalls 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:3531)
	at dotty.tools.dotc.typer.Typer.addImplicitArgs$1(Typer.scala:3567)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsImplicitMethod$1(Typer.scala:3643)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3831)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:4074)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3409)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3028)
	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

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions