diagnostics for deprecated syntax of function type parameter list

This commit is contained in:
Dmitry Jemerov
2015-10-05 20:26:47 +02:00
parent c5d3673b6b
commit 7c20630272
156 changed files with 236 additions and 213 deletions
@@ -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!>}<!>