Skip to content
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

Implicit and hiding warnings interact #9850

Open
scabug opened this issue Jul 8, 2016 · 1 comment
Open

Implicit and hiding warnings interact #9850

scabug opened this issue Jul 8, 2016 · 1 comment

Comments

@scabug
Copy link

scabug commented Jul 8, 2016

From a test. You don't see the warning that the import is not respected because of the implicit error; unless you uncomment the other import and implicitly.

If errors suppress warnings, then it would be nice if there were a way to always display warnings, for example, under -Xfatal-warnings.

case class K(s: java.lang.String)
class C { implicit val k: K = K("OK?"); override def toString = "C(" + k.toString + ")" }

object Test extends App {
  // uncomment to show the warning
  //import concurrent.ExecutionContext.Implicits._
  //def x = implicitly[concurrent.ExecutionContext]
  val c = new C
  import c.k
  def g = implicitly[K]
  val k = 42
}
@scabug
Copy link
Author

scabug commented Jul 8, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9850?orig=1
Reporter: @som-snytt
Affected Versions: 2.12.0-M5

@scabug scabug added this to the Backlog milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant