CFG: provide "used as expression" in enum constant constructor

This allows to avoid
"unused return value of a function with lambda expression body"
for such a situation
So #KT-20429 Fixed
This commit is contained in:
Toshiaki Kameyama
2017-12-23 07:05:43 +03:00
committed by Mikhail Glukhikh
parent e10fa218f5
commit a65304556c
4 changed files with 31 additions and 0 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.UnusedLambdaExpressionBodyInspection
@@ -0,0 +1,7 @@
// PROBLEM: none
enum class Test(f: () -> Unit) {
A(<caret>getFunc())
}
fun getFunc(): () -> Unit = {}