Skip to content

bad parameter reference F at typer #15293

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
tgodzik opened this issue May 26, 2022 · 0 comments · Fixed by #15442
Closed

bad parameter reference F at typer #15293

tgodzik opened this issue May 26, 2022 · 0 comments · Fixed by #15442

Comments

@tgodzik
Copy link
Contributor

tgodzik commented May 26, 2022

Compiler version

3.1.2

Minimized code

trait C[F[_]]:
  val <<f@@oo>>: F[Int]

Output

dotty.tools.dotc.core.TypeError: bad parameter reference F at typer
the parameter is type F in trait C but the prefix <noprefix>
does not define any corresponding arguments.
idx = 0, args = List()
        at dotty.tools.dotc.core.Types$NamedType.argDenot(Types.scala:2326)
        at dotty.tools.dotc.core.Types$NamedType.fromDesignator$1(Types.scala:2240)
        at dotty.tools.dotc.core.Types$NamedType.computeDenot(Types.scala:2258)
        at dotty.tools.dotc.core.Types$NamedType.denot(Types.scala:2213)
        at dotty.tools.dotc.core.Types$NamedType.info(Types.scala:2201)
        at dotty.tools.dotc.core.TypeApplications$.typeParams$extension(TypeApplications.scala:185)
        at dotty.tools.dotc.core.Types$AppliedType.tyconTypeParams(Types.scala:4456)
        at dotty.tools.dotc.core.Types$TypeAccumulator.foldOver(Types.scala:6004)
        at dotty.tools.dotc.core.Types$ExistsAccumulator.apply(Types.scala:6095)
        at dotty.tools.dotc.core.Types$Type.existsPart(Types.scala:452)
        at dotty.tools.dotc.core.Types$Type.isErroneous(Types.scala:359)
        at scala.meta.internal.pc.printer.MetalsPrinter.tpe(MetalsPrinter.scala:67)
        at scala.meta.internal.pc.printer.MetalsPrinter.shortTypeString$1(MetalsPrinter.scala:73)
        at scala.meta.internal.pc.printer.MetalsPrinter.hoverSymbol(MetalsPrinter.scala:101)
        at scala.meta.internal.pc.HoverProvider$.hover(HoverProvider.scala:98)
        at scala.meta.internal.pc.ScalaPresentationCompiler.hover$$anonfun$1(ScalaPresentationCompiler.scala:214)
        at scala.meta.internal.pc.CompilerAccess.withSharedCompiler(CompilerAccess.scala:137)
        at scala.meta.internal.pc.CompilerAccess.withNonInterruptableCompiler$$anonfun$1(CompilerAccess.scala:125)
        at scala.meta.internal.pc.CompilerAccess.onCompilerJobQueue$$anonfun$1(CompilerAccess.scala:197)
        at scala.meta.internal.pc.CompilerJobQueue$Job.run(CompilerJobQueue.scala:139)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Expectation

isErroneous should not throw an exception. Not sure if it's only Metals and IDE related or is it a bigger issue?

@tgodzik tgodzik added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels May 26, 2022
@szymon-rd szymon-rd added area:ide and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels May 26, 2022
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