// !DIAGNOSTICS: -UNUSED_EXPRESSION import Obj.ext import A.Companion.ext2 object Obj { fun foo() {} val bar = 2 val String.ext: String get() = this } class A { companion object { fun foo() {} val bar = 2 val String.ext2: String get() = this } } fun test() { Obj::foo Obj::bar String::ext A.Companion::foo A.Companion::bar String::ext2 A::foo A::bar }