dmitry.petrov
12/23/2016, 12:05 PMDerived1 and Derived2 in expression, Impl can be implicitly inferred, BE will emit CHECKCAST, boom.
Actually you can write similar code in Java (that would implicitly infer Impl), it'd just take a bit more of "creativity" to do so.