// WITH_STDLIB // ISSUE: KT-56722 // FILE: Option.java public interface Option { T get(); public final class Some implements Option { @Override public T get() { return null; } } } // FILE: test.kt fun test_1(option: Option>?) { if (option is Option.Some<*>) { val x = ..CapturedType(*)? & kotlin.Pair?")!>option.get().first x.length } } fun test_2(option: Option>?) { if (option is Option.Some) { val x = ..kotlin.Pair?!")!>option.get().first x.length } }