Use specified comparison generator for chars in optimized ranges

Otherwise if Char value is a result of some erased generic call,
coercing it to I (primitive int) causes CCE at run-time.

 #KT-23104 Fixed Target versions 1.2.40
This commit is contained in:
Dmitry Petrov
2018-03-12 15:22:40 +03:00
parent 2891a6c954
commit d38258d7a0
7 changed files with 44 additions and 10 deletions
@@ -0,0 +1,7 @@
class Cell<T>(val value: T)
fun box(): String =
if (Cell('a').value in 'a'..'z')
"OK"
else
"fail"