Protected in allowed in companion objects but forbidden in other objects, relevant test fixes

This commit is contained in:
Mikhail Glukhikh
2015-11-20 15:34:56 +03:00
parent fdc7c75f5b
commit f81a5c06ea
9 changed files with 19 additions and 17 deletions
@@ -6,7 +6,6 @@ public const val publicConst: Int = 3
public object A {
private const val privateConst: Int = 1
protected const val protectedConst: Int = 2
public const val publicConst: Int = 3
}
@@ -39,7 +38,7 @@ fun check(clazz: Class<*>, expectProtected: Boolean = true) {
}
fun box(): String {
check(A::class.java)
check(A::class.java, false)
check(B::class.java)
check(Class.forName("XYZ"), false)