diagnostics for deprecated syntax of function type parameter list
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
package a
|
||||
|
||||
fun foo<R> (f: ()->R, r: MutableList<R>) = r.add(f())
|
||||
fun bar<R> (r: MutableList<R>, f: ()->R) = r.add(f())
|
||||
fun <R> foo (f: ()->R, r: MutableList<R>) = r.add(f())
|
||||
fun <R> bar (r: MutableList<R>, f: ()->R) = r.add(f())
|
||||
|
||||
fun test() {
|
||||
val <!UNUSED_VARIABLE!>a<!> = <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>foo<!>({1}, arrayListOf("")) //no type inference error on 'arrayListOf'
|
||||
@@ -9,4 +9,4 @@ fun test() {
|
||||
}
|
||||
|
||||
// from standard library
|
||||
fun arrayListOf<T>(vararg <!UNUSED_PARAMETER!>values<!>: T) : MutableList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
fun <T> arrayListOf(vararg <!UNUSED_PARAMETER!>values<!>: T) : MutableList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
Reference in New Issue
Block a user