Visibility modifiers are no longer allowed on local classes

This commit is contained in:
Mikhail Glukhikh
2015-09-30 15:46:58 +03:00
parent 6f7d9459fa
commit 7256a546df
5 changed files with 25 additions and 8 deletions
@@ -0,0 +1,6 @@
fun foo() {
<!WRONG_MODIFIER_TARGET!>public<!> class A
<!WRONG_MODIFIER_TARGET!>private<!> class B
<!WRONG_MODIFIER_TARGET!>protected<!> class C
<!WRONG_MODIFIER_TARGET!>internal<!> class D
}
@@ -0,0 +1,3 @@
package
public fun foo(): kotlin.Unit
@@ -31,7 +31,7 @@ public <!REPEATED_MODIFIER!>public<!> val bar: Int = 1
public <!REPEATED_MODIFIER!>public<!> fun foo(): Int = 1
fun test() {
public <!REPEATED_MODIFIER!>public<!> class B(public <!REPEATED_MODIFIER!>public<!> val z: Int = 1) {
<!WRONG_MODIFIER_TARGET!>public<!> <!REPEATED_MODIFIER!>public<!> class B(public <!REPEATED_MODIFIER!>public<!> val z: Int = 1) {
public <!REPEATED_MODIFIER!>public<!> val y: Int = 2
public val x: Int