, :
trait Foo
trait Bar extends Foo
, Bar Foo:
val ev = implicitly[Bar <:< Foo]
-Xprint:typer, :
private[this] val ev: <:<[Bar,Foo] =
scala.this.Predef.implicitly[<:<[Bar,Foo]](scala.this.Predef.$conforms[Bar]);
, $conforms[Bar] , . , Bar <:< Bar, <:< , Bar <:< Foo, .
( - , Scala , , , .)
, , Bar String:
val ev = implicitly[Bar <:< String]
-Xlog-implicits, :
<console>:9: $conforms is not a valid implicit value for <:<[Bar,String] because:
hasMatchingSymbol reported error: type mismatch;
found : <:<[Bar,Bar]
required: <:<[Bar,String]
val ev = implicitly[Bar <:< String]
^
<console>:9: error: Cannot prove that Bar <:< String.
val ev = implicitly[Bar <:< String]
^
Bar <:< Bar, Bar String, Bar <:< String, , . $conforms - , <:< ( , ), .
: <:<[-From, +To] , . singleton Any <:< Any - val , , , , .