-
Notifications
You must be signed in to change notification settings - Fork 1.1k
no implicit argument was found for implicit parameter #14171
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
So odd - where did [[syntax trees at end of typer]] // rs$line$1
package repl {
final lazy module val rs$line$1: repl.rs$line$1 = new repl.rs$line$1()
final module class rs$line$1() extends Object() { this: repl.rs$line$1.type =>
trait MyTypeclass[F[_ >: Nothing <: Any] >: Nothing <: Any]() extends Object
{
F[_$1]
}
def f[F[_ >: Nothing <: Any] >: Nothing <: Any, U >: Nothing <: Any](t: F[U]
)
(implicit evidence$1: MyTypeclass[F]): Nothing = ???
type MyType[T >: Nothing <: Any] = String
implicit val impl: MyTypeclass[MyType] = ???
val stream: Option[MyType[Int]] = ???
val res0: Option[Nothing] =
stream.map[(MyType[Int], Int)](
{
def $anonfun(keyStream: MyType[Int]): (MyType[Int], Int) =
{
val x: Int = 17
Tuple2.apply[MyType[Int], Int](keyStream, x)
}
closure($anonfun)
}
).map[Nothing](
{
def $anonfun(x$1: (MyType[Int], Int)): Nothing =
x$1:(x$1 : (MyType[Int], Int)) @unchecked match
{
case Tuple2.unapply[String, Int](keyStream @ _, x @ _) =>
f[Comparable, String](keyStream)(
/* missing */summon[MyTypeclass[Comparable]]
)
}
closure($anonfun)
}
)
}
} |
In general, we don't guarantee that type aliases are preserved by type inference (and neither does scala 2, although it happens to work in this case), so this might be a won't fix. |
I could make this example work but I couldn't make |
Compiler version
3.1.1-RC1
Minimized code
https://scastie.scala-lang.org/t7ixyW5qQtqxSnQWGIsQDw
Output
Expectation
Should compile like in Scala
2.13
The text was updated successfully, but these errors were encountered: