[FIR] Report UNSUPPORTED for default value in function type

This commit is contained in:
Ivan Kochurkin
2022-06-15 15:01:16 +03:00
committed by teamcity
parent a3647bb4ff
commit ffbb23661d
6 changed files with 46 additions and 20 deletions
@@ -1,20 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
fun f(x: Int = 0) {}
val inVal: (x: Int = 0)->Unit = {}
fun inParam(fn: (x: Int = 0)->Unit) {}
fun inParamNested(fn1: (fn2: (n: Int = 0)->Unit)->Unit) {}
fun inReturn(): (x: Int = 0)->Unit = {}
class A : (Int)->Unit {
override fun invoke(p1: Int) {
var lambda: (x: Int = 0)->Unit = {}
}
val prop: (x: Int = 0)->Unit
get(): (x: Int = 0)->Unit = {}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
fun f(x: Int = 0) {}