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: