Skip to content

Unused warning on scala 2.13.5 #50

@amumurst

Description

@amumurst

Given build.sbt

scalaVersion := "2.13.5"
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
scalacOptions += "-Ywarn-unused"

And main

object Main extends App {
  for {
    implicit0(i: Int) <- Option(1)
  } yield println(i)
}

I get warning

[warn] /dev/foo/src/main/scala/Main.scala:3:23: local val i$implicit$1 in value $anonfun is never used
[warn]     implicit0(i: Int) <- Option(1)
[warn]                       ^
[warn] one warning found

I do not get this on 2.13.4.
It still works and can be passed as an implicit, its just a bad warning produced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions