Do not return nested/local classes as a part of package fragment

#KT-13757 Fixed
This commit is contained in:
Denis Zharkov
2016-09-07 14:23:16 +03:00
parent 4bf61db9f9
commit 44f5df00fe
6 changed files with 62 additions and 9 deletions
@@ -0,0 +1,5 @@
package test;
public class JavaOuter {
public static class JavaNested {}
}
@@ -0,0 +1,5 @@
package test
class Outer {
class Nested
}
@@ -0,0 +1,10 @@
import test.Outer
import test.JavaOuter
fun main(args: Array<String>) {
Outer.Nested()
test.`Outer$Nested`()
JavaOuter.JavaNested()
test.`JavaOuter$JavaNested`()
}
@@ -0,0 +1,7 @@
compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/main.kt:6:10: error: unresolved reference: `Outer$Nested`
test.`Outer$Nested`()
^
compiler/testData/compileKotlinAgainstCustomBinaries/prohibitNestedClassesByDollarName/main.kt:9:10: error: unresolved reference: `JavaOuter$JavaNested`
test.`JavaOuter$JavaNested`()
^
COMPILATION_ERROR