-
Notifications
You must be signed in to change notification settings - Fork 1.1k
summonFrom and summon use different scopes for implicit search #11538
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
Comments
This comment has been minimized.
This comment has been minimized.
Minimized package a:
type Foo
given foo: Foo = ???
import a.{Foo, given}
object test:
inline def summonInlineFoo = scala.compiletime.summonInline[Foo]
val summoned = summon[Foo]
val summonedInline = summonInlineFoo Moving the |
It is related but not exactly #11479 |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 26, 2021
This was referenced Feb 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.0.0-RC1
Minimized code
https://scastie.scala-lang.org/KfWryGwAT3SW7xwpv6k6OA
Output
Compiler error due to the fact that
summonFrom
only seems to do the implicit search within the closest enclosing scope (it compiles if the given is imported in the same scope as thesummonFrom
call).Expectation
The calls to
summon
andsummonFrom
should obey the same rules for implicit search.The text was updated successfully, but these errors were encountered: