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

Compiler error: could not find implicit value in parent class constructor when declaring class or object #9471

Closed
scabug opened this issue Sep 16, 2015 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Sep 16, 2015

A test case:

class Foo {
  class Marker
  implicit def marker: Marker = new Marker
  def needMarker()(implicit marker: Marker) {}
}

class Bar(foo: Foo)

class Baz extends Bar(new Foo {
  needMarker() // error: could not find implicit value for parameter marker: this.Marker
})
object Baz2 extends Bar(new Foo {
  needMarker() // error: could not find implicit value for parameter marker: this.Marker
})

val bar = new Bar(new Foo {
  needMarker() // however, this code compiles ok
})
@scabug
Copy link
Author

scabug commented Sep 16, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9471?orig=1
Reporter: Denis Denisenko (winmain)
Affected Versions: 2.11.7
Attachments:

  • test.scala (created on Sep 16, 2015 2:54:08 AM UTC, 518 bytes)

@som-snytt
Copy link

Compiles on 2.13.4 and 3.0-M1.

@SethTisue SethTisue modified the milestones: Backlog, 2.13.4 Nov 20, 2020
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

4 participants