From 1b6f96ac2b71bcbbf019d1e4d38e570c671532cb Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Thu, 17 Dec 2015 19:51:34 +0300 Subject: [PATCH] Minor. update diagnostics/ReadMe.md --- compiler/testData/diagnostics/ReadMe.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/testData/diagnostics/ReadMe.md b/compiler/testData/diagnostics/ReadMe.md index 78ed94e36c9..54681b52bec 100644 --- a/compiler/testData/diagnostics/ReadMe.md +++ b/compiler/testData/diagnostics/ReadMe.md @@ -30,13 +30,16 @@ Must be The directive adds the following declarations to the file: - class _ - fun T.checkType(f: (_) -> Unit) = f + fun checkSubtype(t: T) = t + + class Inv + fun Inv._() {} + infix fun T.checkType(f: Inv.() -> Unit) {} With that, an exact type of an expression can be checked in the following way: fun test(expr: A) { - expr checkType { it: _ } + expr checkType { _() } } #### Usage: