check modifiers for local declarations

This commit is contained in:
Svetlana Isakova
2012-08-22 16:05:17 +04:00
parent 5bac198165
commit ea611cb51d
6 changed files with 25 additions and 6 deletions
+1 -1
View File
@@ -5,4 +5,4 @@ fun fib(n: Int): Int {
return v
}
public val result = fib(num)
val result = fib(num)
@@ -0,0 +1,12 @@
package d
class T {
fun baz() = 1
}
fun foo() {
<!ILLEGAL_MODIFIER!>public<!> val <!UNUSED_VARIABLE!>i<!> = 11
<!ILLEGAL_MODIFIER!>abstract<!> val <!VARIABLE_WITH_NO_TYPE_NO_INITIALIZER, UNUSED_VARIABLE!>j<!>
<!ILLEGAL_MODIFIER!>override<!> fun T.baz() = 2
<!ILLEGAL_MODIFIER!>private<!> fun bar() = 2
}
@@ -2,6 +2,5 @@ package test
public open class MethodTypePTwoUpperBounds() : java.lang.Object() {
public open fun <T> foo(): Unit where T : Cloneable?, T : Runnable? {
override fun run() = throw UnsupportedOperationException()
}
}