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

Scala 2 regression: spurious missing implicit error when inheriting a class without call parentheses() #16778

Closed
neko-kai opened this issue Jan 27, 2023 · 0 comments · Fixed by #16896
Labels
area:implicits related to implicits itype:bug
Milestone

Comments

@neko-kai
Copy link
Contributor

Compiler version

3.2.2 and 3.3.0-RC2

Minimized code

https://scastie.scala-lang.org/j5EDdUDcRsCCuDymUHM0PQ

final abstract class ForcedRecompilationToken[T]

object ForcedRecompilationToken {
  inline implicit def materialize: ForcedRecompilationToken["x"] = null.asInstanceOf[ForcedRecompilationToken["x"]]
}

abstract class PluginDef[T](implicit val recompilationToken: ForcedRecompilationToken[T])

object X {
  val bad = new PluginDef {} // No given instance
  val good = new PluginDef() {} // ok
}

object DependingPlugin {
  class NestedDoublePlugin extends PluginDef
  object NestedDoublePlugin extends PluginDef
}

Output

No given instance of type ForcedRecompilationToken[Nothing] was found for parameter recompilationToken of constructor PluginDef in class PluginDef

Expectation

Expected to compile, as in Scala 2.

Expected the parentheses to be purely cosmetic in this position.

Previous similar issue: #15976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:implicits related to implicits itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants