Files
kotlin-fork/idea/testData/inspections/redundantSamConstructor/nonApplicable.kt
T
Roman Golyshev 4042214bb2 Fix tests broken by enhanced RedundantSamConstructor inspection
- The inspection now works in more cases, so the test data had to be
updated accordingly
2020-02-20 17:27:41 +03:00

17 lines
471 B
Kotlin
Vendored

package redundantSamConstructor
import a.*
fun testNonApplicableAmbiguity(p: Int) {
GenericClassCantBeReplaced.staticFun1(JFunction0 { "" })
GenericClassCantBeReplaced.staticFun2(JFunction0 { "" }, JFunction0 { "" })
val klass = GenericClassCantBeReplaced()
klass.memberFun1(JFunction0 { "" })
klass.memberFun2(JFunction0 { "" }, JFunction0 { "" })
MyJavaClass.staticFun1(Runnable {
if (p > 0) return@Runnable
print(1)
})
}