sbt / zinc

Scala incremental compiler library, used by sbt and other build tools
Apache License 2.0
333 stars 118 forks source link

Zinc does not consider implicit in default namespace #616

Open avdv opened 5 years ago

avdv commented 5 years ago

Inside the default namespace, implicit resolution does consider implicits defined in a package object in the default namespace too.

But zinc seems to rule out implicits those implicits and compilation fails.

Here's a minimal sample project: https://github.com/avdv/zinc-default-namespace-bug

Friendseeker commented 9 months ago

@SethTisue I am unfamiliar with Scala compiler, would you say this is a compiler issue?

As in OP's reproduction, Foo is invalidated after Foo is changed, but nothing depends on Foo, so Zinc seems to be doing its job by just invalidating Foo.

Rather Scala Compiler should successfully find implicit value for bar instead of throwing could not find implicit value for parameter bar.