We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The test is a version of i8802.scala, with an explicit implicit argument.
trait Foo[A1, B1] { type Out } object Test { type Bar[A2] def unit: Bar[Unit] = ??? def product[A3, B3](fst: Bar[A3], snd: Bar[B3])(implicit foo: Foo[A3, B3]): Bar[foo.Out] = ??? implicit def foo[A4]: Foo[A4, Unit] { type Out = A4 } = ??? def check[A5](bar: Bar[A5])(a: A5): Unit = {} check(product(unit, unit)) // ok check(product(unit, unit)(summon[Foo[Unit, Unit]]))(()) // error if implicit argument is given explicitly }
-- [E007] Type Mismatch Error: ../pos/i8802a.scala:17:27 ----------------------- 17 | check(product(unit, unit)(summon[Foo[Unit, Unit]]))(()) // error | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Found: Test.Bar[Unit] | Required: Test.Bar[(Foo[Unit, Unit] & Singleton)#Out] longer explanation available when compiling with `-explain` -- [E007] Type Mismatch Error: ../pos/i8802a.scala:17:54 ----------------------- 17 | check(product(unit, unit)(summon[Foo[Unit, Unit]]))(()) // error | ^^ | Found: Unit | Required: (Foo[Unit, Unit] & Singleton)#Out
Should compile
The text was updated successfully, but these errors were encountered:
Take actual arguments for dependent TypeVars into account
7ca1b1d
Fixes scala#12534
00277e9
Successfully merging a pull request may close this issue.
Minimized example
The test is a version of i8802.scala, with an explicit implicit argument.
Output
Expectation
Should compile
The text was updated successfully, but these errors were encountered: