# Why cant we see the implementation of kotlin native methods?

**URL:** <https://discuss.kotlinlang.org/t/why-cant-we-see-the-implementation-of-kotlin-native-methods/6715>\
**Category:** Support\
**Created:** [February 20, 2018, 4:38pm UTC](https://discuss.kotlinlang.org/t/why-cant-we-see-the-implementation-of-kotlin-native-methods/6715 "2018-02-20T16:38:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielhuhn](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/danielhuhn/32/2983_2.png) [@danielhuhn](https://discuss.kotlinlang.org/u/danielhuhn)\
**Post date:** [February 20, 2018, 4:38pm UTC](https://discuss.kotlinlang.org/t/why-cant-we-see-the-implementation-of-kotlin-native-methods/6715/1 "2018-02-20T16:38:10Z")

</div>

When using Kotlin (JVM) in Intellij, I sometimes are wondering how some buildin methods are implemented.  
However when I go to their defintion I only get this “compiled code” thing:

 ![grafik](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/2X/5/5d3f7c3ffefedbfe2b2004ab4747ea7a68310335.png)

Why is this? As kotlin has no native (e.g. x64 machine code) components why cant the source code be shown here?

NOTE: It seems like the go to definition jumps to a library version of a transitive dependency. But still, why cant the decompiler show me the code?

---

<div class="post-metadata">

**Author:** ![SackCastellon](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/sackcastellon/32/4553_2.png) [@SackCastellon](https://discuss.kotlinlang.org/u/SackCastellon)\
**Post date:** [February 21, 2018, 12:12am UTC](https://discuss.kotlinlang.org/t/why-cant-we-see-the-implementation-of-kotlin-native-methods/6715/2 "2018-02-21T00:12:49Z")

</div>

Try downloading the source code, by doing one of the following:

- Click the **Download Sources** button in the yellow message on the top.
- Go to **File | Settings | Build, Execution, Deployment | Build Tools | Maven | Importing** and check **Automatically download Sources**.
- Go to the **pom.xml** and select **Maven | Download Sources**.

EDIT: In the case you are using Gradle the process should be very similar.

---

<div class="post-metadata">

**Author:** ![pdvrieze](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pdvrieze/32/1882_2.png) [@pdvrieze](https://discuss.kotlinlang.org/u/pdvrieze)\
**Post date:** [February 26, 2018, 8:50pm UTC](https://discuss.kotlinlang.org/t/why-cant-we-see-the-implementation-of-kotlin-native-methods/6715/3 "2018-02-26T20:50:43Z")

</div>

Those functions are provided as compiler intrinsics, generally because it is actually impossible to implement them without compiler magic.
