Regular modifier checker implemented (initial version). A set of tests fixed accordingly.
Most of modifier diagnostic is expressed by REDUNDANT_MODIFIER, INCOMPATIBLE_MODIFIERS, REPEATED_MODIFIER, WRONG_MODIFIER_TARGET, WRONG_MODIFIER_PARENT. A set of modifier diagnostics is not in use now (but not deleted yet).
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
open interface First {
|
||||
interface First {
|
||||
public open fun foo() : Int
|
||||
}
|
||||
|
||||
open interface Second : First {
|
||||
interface Second : First {
|
||||
public open fun bar() : Int
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun box(): String {
|
||||
open interface L1 {
|
||||
interface L1 {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ public class Output(val d: Data) : Closeable {
|
||||
public fun doOutput(data: Int): Int = data
|
||||
}
|
||||
|
||||
public open interface Closeable {
|
||||
public interface Closeable {
|
||||
open public fun close() {}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ public class Output(val d: Data) : Closeable {
|
||||
public fun doOutput(data: Int): Int = data
|
||||
}
|
||||
|
||||
public open interface Closeable {
|
||||
public interface Closeable {
|
||||
open public fun close() {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user