Files
kotlin-fork/backend.native/tests/codegen/function/intrinsic.kt
T
Alexander Gorshenev 1d265bc50c Here goes stdlib separation.
$ gradlew backend.native:stdlib

builds you stdlib.kt.bc now.

The test runs are taught to supply
-library stdlib.kt.bc to kotlin compiler for proper imports resolution,
and then later stdlib.kt.bc is provided to clang for the final link step.
2016-11-18 19:11:38 +04:00

12 lines
302 B
Kotlin

// This code fails to link when bultins are taken from the
// frontend generated module, instead of our library.
// Because the generated module doesn't see our name changing annotations,
// the function names are all wrong.
fun intrinsic(b: Int): Int {
var sum = 1
sum = sum + b
return sum
}