Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ scala -Xprint:typer -e "implicit def f[A, B <: A]: A => B = x => x"
- [[syntax trees at end of typer]] // scalacmd1608811321047988530.scala
- package <empty> {
- object Main extends scala.AnyRef {
- def <init>(): Main.type = {
- Main.super.<init>();
- ()
- };
- def main(args: Array[String]): Unit = {
- final class $anon extends scala.AnyRef {
- def <init>(): <$anon: AnyRef> = {
- $anon.super.<init>();
- ()
- };
- implicit private def f[A, B <: A]: A => B = ((x: A) => $anon.this.f[A, Nothing].apply(x))
- };
- {
- new $anon();
- ()
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement