// FIR_DIFFERENCE // The difference is okay: K1 and K2 report a bit differently // MODULE: lib1 // FILE: A.kt class ClassFromOtherModule { companion object { val valFromOtherModuleCompanion = "valFromOtherModuleCompanion" } } // FILE: B.kt class ClassFromOtherModule2 { companion object { val valFromOtherModuleCompanion2 = ClassFromOtherModule.valFromOtherModuleCompanion + "2" } } // MODULE: main(lib1) // FILE: A.kt class ClassFromOtherFile { companion object { val valFromOtherFileCompanion = "valFromOtherFileCompanion" } } // FILE: B.kt class ClassFromOtherFile2 { companion object { val valFromOtherFileCompanion2 = ClassFromOtherFile.valFromOtherFileCompanion + "2" } } // FILE: Main.kt class ClassFromThisFile { companion object { val valFromThisFileCompanion = "valFromThisFileCompanion" fun testCompanionFromThisCompanion() { js("var ${valFromThisFileCompanion} = 1;") js("var " + valFromThisFileCompanion + " = 1;") } } fun testCompanionFromThis() { js("var ${valFromThisFileCompanion} = 1;") js("var " + valFromThisFileCompanion + " = 1;") } } class ClassFromThisFile2 { companion object { val valFromThisFileCompanion2 = ClassFromThisFile.valFromThisFileCompanion + "2" fun testCompanionFromThisCompanion() { js("var ${valFromThisFileCompanion2} = 1;") js("var " + valFromThisFileCompanion2 + " = 1;") } } fun testCompanionFromThis() { js("var ${valFromThisFileCompanion2} = 1;") js("var " + valFromThisFileCompanion2 + " = 1;") } } fun testCompanionValFromOtherModule() { js("var ${ClassFromOtherModule.valFromOtherModuleCompanion} = 1;") js("var " + ClassFromOtherModule.valFromOtherModuleCompanion + " = 1;") } fun testCompanionValFromOtherModule2() { js("var ${ClassFromOtherModule2.valFromOtherModuleCompanion2} = 1;") js("var " + ClassFromOtherModule2.valFromOtherModuleCompanion2 + " = 1;") } fun testCompanionValFromOtherFile() { js("var ${ClassFromOtherFile.valFromOtherFileCompanion} = 1;") js("var " + ClassFromOtherFile.valFromOtherFileCompanion + " = 1;") } fun testCompanionValFromOtherFile2() { js("var ${ClassFromOtherFile2.valFromOtherFileCompanion2} = 1;") js("var " + ClassFromOtherFile2.valFromOtherFileCompanion2 + " = 1;") } fun testCompanionValFromThisFile() { js("var ${ClassFromThisFile.valFromThisFileCompanion} = 1;") js("var " + ClassFromThisFile.valFromThisFileCompanion + " = 1;") } fun testCompanionValFromThisFile2() { js("var ${ClassFromThisFile2.valFromThisFileCompanion2} = 1;") js("var " + ClassFromThisFile2.valFromThisFileCompanion2 + " = 1;") }