# Feature request: \`typealias\` to allow access to \`companion object\`

**URL:** <https://discuss.kotlinlang.org/t/feature-request-typealias-to-allow-access-to-companion-object/28149>\
**Category:** Uncategorized\
**Created:** [February 15, 2024, 12:52pm UTC](https://discuss.kotlinlang.org/t/feature-request-typealias-to-allow-access-to-companion-object/28149 "2024-02-15T12:52:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![OndraZizka](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ondrazizka/32/7143_2.png) [@OndraZizka](https://discuss.kotlinlang.org/u/OndraZizka)\
**Post date:** [February 15, 2024, 12:52pm UTC](https://discuss.kotlinlang.org/t/feature-request-typealias-to-allow-access-to-companion-object/28149/1 "2024-02-15T12:52:26Z")

</div>

This doesn’t work:

```
typealias A = B
class B { companion object { fun foo(){} } }
A.foo()

```

Which is a pity, as it prevents typealias to be used to provide backwards compatibility for renamed or moved classes.

Could Kotlin support access to companion object through the alias?

If not, why?  
Thanks for considering.
