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:
+1
-1
@@ -3,7 +3,7 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
abstract class J {
|
||||
public abstract fun <T : Collection<S>, S : List<<!ILLEGAL_MODIFIER!>in<!> *>> foo(x: T)
|
||||
public abstract fun <T : Collection<S>, S : List<<!WRONG_MODIFIER_TARGET!>in<!> *>> foo(x: T)
|
||||
fun bar() {
|
||||
val s = ArrayList<ArrayList<Int>>()
|
||||
foo(s)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
abstract class J {
|
||||
public abstract fun <T : Collection<S>, S : List<<!ILLEGAL_MODIFIER!>out<!> *>> foo(x: T)
|
||||
public abstract fun <T : Collection<S>, S : List<<!WRONG_MODIFIER_TARGET!>out<!> *>> foo(x: T)
|
||||
fun bar() {
|
||||
val s = ArrayList<ArrayList<Int>>()
|
||||
foo(s)
|
||||
|
||||
Reference in New Issue
Block a user