class Outer { class Nested { fun foo(t: T) = t } class Nested2 { fun foo(t: T) = t } inner class Inner { fun foo(t: T) = t } }