Type inference는 호출의 여러 제약을 한 타입 관계로 모은다

한 위치의 정보가 약하면 compiler는 argument·receiver·target type을 함께 사용합니다.

inference constraints같은 type variable을 공유

receiver

호출 대상 generic

arguments

실제 인수 타입

lambda target

SAM signature

assignment

기대 결과 타입

bounds

extends·super 제한

핵심: 모호할 때 lambda 내부 cast보다 타입이 있는 지역 변수로 제약을 드러냅니다.