Files
kotlin-fork/compiler/testData/codegen/box/multifileClasses/optimized/overlappingFuns.kt
T
Dmitry Petrov 06101dba52 KT-13961 REDECLARATION not reported on private-in-file 'foo' vs public 'foo' in different file
Private-in-file declarations conflict with public overload-equivalent declarations
in other files in the same package.

Move functions for grouping possible redeclarations to OverloadResolver
(since they are used only there).

Refactor redeclarations / conflicting overloads reporting.
2016-10-03 11:50:29 +03:00

28 lines
511 B
Kotlin
Vendored

// WITH_RUNTIME
// KOTLIN_CONFIGURATION_FLAGS: +JVM.INHERIT_MULTIFILE_PARTS
// FILE: box.kt
import a.*
fun box(): String = ok()
// FILE: part1.kt
@file:[JvmName("MultifileClass") JvmMultifileClass]
package a
private fun overlapping() = "oops #1"
// FILE: part2.kt
@file:[JvmName("MultifileClass") JvmMultifileClass]
package a
private fun overlapping() = "OK"
fun ok() = overlapping()
// FILE: part3.kt
@file:[JvmName("MultifileClass") JvmMultifileClass]
package a
private fun overlapping() = "oops #2"