Skip to content

default values for implicit parameters are ignored #576

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
smarter opened this issue May 16, 2015 · 1 comment
Closed

default values for implicit parameters are ignored #576

smarter opened this issue May 16, 2015 · 1 comment

Comments

@smarter
Copy link
Member

smarter commented May 16, 2015

This works fine in scalac but does not compile with dotty:

class A

object Impl {
  def foo()(implicit x: A = null): Int = 2
  def test: Int = {
    foo()
  }
}
[error] try/impldef.scala:6: error: no implicit argument of type A found for parameter x of method foo in object Impl$
[error]     foo()
[error]          ^
@smarter
Copy link
Member Author

smarter commented May 17, 2015

Needed for tests/pending/run/Meter.scala.

odersky added a commit to dotty-staging/dotty that referenced this issue Feb 10, 2016
Fixes scala#576.

run/pending/Meter now compiles; crashes at runtime.

Review by @smarter.
odersky added a commit to dotty-staging/dotty that referenced this issue Feb 10, 2016
Fixes scala#576.

run/pending/Meter now compiles; crashes at runtime.

Review by @smarter.
smarter pushed a commit to dotty-staging/dotty that referenced this issue Feb 12, 2016
Fixes scala#576.

run/pending/Meter now compiles; crashes at runtime
odersky referenced this issue Feb 18, 2016
Handle implicits with default parameters.
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

2 participants