Files
kotlin-fork/compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt
T
Alexander Udalov fa1f7d988e Get rid of CompileKotlinAgainstMultifileKotlinTestGenerated and boxMultifileClasses/
Merge tests in boxMultifileClasses/calls to one test case; copy the two
resulting tests (+ change box to main) to compileKotlinAgainstKotlin
2016-02-27 15:40:05 +03:00

22 lines
501 B
Kotlin
Vendored

// FILE: A.kt
@file:[JvmName("MultifileClass") JvmMultifileClass]
package a
fun foo(): String = "OK"
const val constOK: String = "OK"
val valOK: String = "OK"
var varOK: String = "Hmmm?"
// FILE: B.kt
import a.*
fun main(args: Array<String>) {
if (foo() != "OK") throw AssertionError("Fail function")
if (constOK != "OK") throw AssertionError("Fail const")
if (valOK != "OK") throw AssertionError("Fail val")
varOK = "OK"
if (varOK != "OK") throw AssertionError("Fail var")
}