A test that fails in lazy mode (currently disabled)

This commit is contained in:
Andrey Breslav
2014-04-23 18:14:16 +04:00
parent 5c23021163
commit 31e859356f
2 changed files with 22 additions and 0 deletions
@@ -0,0 +1,17 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
trait JPAEntityClass<D> {
fun <T> T.findByName(s: String): D {null!!}
}
class Foo {
class object : JPAEntityClass<Foo>
}
fun main(args: Array<String>) {
<!TYPE_INFERENCE_TYPE_CONSTRUCTOR_MISMATCH!>with<!>("", {
Foo.<!MISSING_RECEIVER, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>findByName<!>("")
})
}
fun <T> with(t: T, f: T.() -> Unit) {}