Add quick-fix for CANNOT_CHECK_FOR_ERASED #KT-18742 Fixed

This commit is contained in:
Toshiaki Kameyama
2017-09-17 15:54:07 +03:00
committed by Mikhail Glukhikh
parent 6a1b6d10d8
commit d87c0b164f
7 changed files with 105 additions and 0 deletions
@@ -0,0 +1,6 @@
// "Make type parameter reified and function inline" "false"
// ACTION: Change type arguments to <*>
// ACTION: Convert to block body
// ACTION: Introduce local variable
// ERROR: Cannot check for instance of erased type: List<Int>
fun test(a: List<Any>) = a is List<Int><caret>
@@ -0,0 +1,6 @@
// "Make type parameter reified and function inline" "false"
// ACTION: Change type arguments to <*>
// ACTION: Convert to block body
// ACTION: Introduce local variable
// ERROR: Cannot check for instance of erased type: List<Int>
fun <T> test(a: List<Any>) = a is List<Int><caret>
@@ -0,0 +1,2 @@
// "Make type parameter reified and function inline" "true"
fun <T> test(a: String) = a is T<caret>
@@ -0,0 +1,2 @@
// "Make type parameter reified and function inline" "true"
inline fun <reified T> test(a: String) = a is T