nbscala icon indicating copy to clipboard operation
nbscala copied to clipboard

Pressing "." after "_" in val plus1 = (_:Int) + 1

Open Rogach opened this issue 13 years ago • 2 comments

If I type the following in some method

val plus1 = (_:Int) + 1

and type "." after "_", the following exception is thrown:

scala.tools.nsc.symtab.Types$TypeError: not found: value x$3 at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:291) at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:205) at scala.tools.nsc.typechecker.Typers$Typer.typedIdent$1(Typers.scala:3765) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4136) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4219) at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:4287) at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:4295) at scala.tools.nsc.interactive.Global.scala$tools$nsc$interactive$Global$$typeMembers(Global.scala:809) at scala.tools.nsc.interactive.Global$$anonfun$getTypeCompletion$2.apply(Global.scala:791) at scala.tools.nsc.interactive.Global$$anonfun$getTypeCompletion$2.apply(Global.scala:791) at scala.tools.nsc.interactive.Global.respondGradually(Global.scala:527) at scala.tools.nsc.interactive.Global.getTypeCompletion(Global.scala:791) at scala.tools.nsc.interactive.CompilerControl$AskTypeCompletionItem.apply$mcV$sp(CompilerControl.scala:287) at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:333) [catch] at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:22)

I looked through the plugin code, and failed to find the place where this stack trace could originate. Any ideas?

Rogach avatar Jul 29 '11 13:07 Rogach

Still the case

og0815 avatar Aug 16 '12 19:08 og0815

I cannot reproduce this in 2.10.1 / 1.6.1

Close?

thomassuckow avatar May 23 '13 17:05 thomassuckow