check modifiers for local declarations
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user