b8052761db
We cannot always return null, because in such case some expressions would become not fully explorable from the types perspective (see the documentation on the `getCorrespondingTypeIfPossible`) `FirNamedReference` might appear when resolving method references (like `foo::bar`), but also when IJ Platform tries to resolve other parts of the Kotlin PSI, notably a `KtNameReferenceExpression` in a function call (`bar` in `foo.bar(baz)` expression). N.B. FE10 implementation does not support returning `null` as a type - currently it always returns `Unit` type in case it cannot figure out the actual type. This issue should probably be tackled together with KT-60166, so that both implementations are more or less aligned ^KT-60341 Fixed ^KT-59077 Fixed ^KTIJ-25745 Fixed