Move visibility check for toplevel private declarations to Visibilities.PRIVATE and fix it.

Original commit: a36e4abf4d
This commit is contained in:
Zalim Bashorov
2015-09-30 23:06:16 +03:00
parent 44f754521a
commit eb1f04c29d
6 changed files with 41 additions and 0 deletions
@@ -0,0 +1,19 @@
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/test/TestPackage.class
out/production/module/test/UsageKt.class
End of files
Compiling files:
src/usage.kt
End of files
COMPILATION FAILED
Cannot access 'foo': it is 'private' in file
Cleaning output files:
out/production/module/test/FooKt.class
End of files
Compiling files:
src/foo.kt
src/usage.kt
End of files
@@ -0,0 +1,3 @@
package test
private fun foo() = 1
@@ -0,0 +1,4 @@
package test
fun usage() {
}
@@ -0,0 +1,5 @@
package test
fun usage() {
println(foo())
}
@@ -0,0 +1,4 @@
package test
fun usage() {
}