이 질문은 this one에서 영감을 받았습니다. 아래 예제에서 암시 적 매개 변수와 함께 예상 식 형식을 사용하면 형식 유추 관리자가 함수의 형식 매개 변수가 암시 적 인수를 제한하지 않는다고 결정하게되는 이유는 무엇입니까? (즉, 만약 실제로 여기에 무슨.)암시 적 매개 변수가있는 예상 유형 및 다형 함수가 형식 유추를 혼동합니까?
case class ThingA(name: String)
case class ThingB(name: String)
class ThingClass[T]
implicit val thingClassA = new ThingClass[ThingA]
implicit val thingClassB = new ThingClass[ThingB]
def find[T](): Option[T] = None
def findWithContextBound[T: ThingClass](): Option[T] = None
val typeApplicationFind = find[ThingA]()
val typeApplicationFindWithContextBound = findWithContextBound[ThingA]()
val expectedTypeFind: Option[ThingA] = find()
val expectedTypeFindWithContextBound: Option[ThingA] = findWithContextBound()
마지막 표현이 모호한 경우에도 예상되는 형태가 findWithContextBound에 대한 형식 매개 변수를 제한해야한다.