We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
object Incompat2 { trait Context { type Out } object Context { def foo(implicit ctx: Context): Option[ctx.Out] = ??? def bar(implicit ctx: Context): (Option[ctx.Out], String) = (foo, "foo") } }
7 | def bar(implicit ctx: Context): (Option[ctx.Out], String) = (foo, "foo") | ^^^^^^^^^^^^ | Found: (Option[Any], String) | Required: (Option[ctx.Out], String)
The code compiles.
It does compile if we pass the implicit parameter explicitly, though:
object Incompat2 { trait Context { type Out } object Context { def foo(implicit ctx: Context): Option[ctx.Out] = ??? def bar(implicit ctx: Context): (Option[ctx.Out], String) = (foo(ctx), "foo") // note: foo(ctx) } }
Probably a similar test case can be found in https://github.com/mlachkar/scala-migrat3/pull/22
Maybe similar issues: #8991, #8882
The text was updated successfully, but these errors were encountered:
More careful instantation of wildcards when solving constraints
e9608f0
The previous treatment could instantiate a wildcard type to a type that violated constraint satisfiability. Fixes scala#10161
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
Minimized code
Output
Expectation
The code compiles.
It does compile if we pass the implicit parameter explicitly, though:
Probably a similar test case can be found in https://github.com/mlachkar/scala-migrat3/pull/22
Maybe similar issues: #8991, #8882
The text was updated successfully, but these errors were encountered: