Scripts: coerce result to the actual expression type

#KT-5622 Fixed
This commit is contained in:
Alexander Udalov
2014-08-13 16:14:28 +04:00
parent 6e46bea821
commit 9c00e1c94d
4 changed files with 35 additions and 2 deletions
@@ -0,0 +1,8 @@
>>> array(1, 2)[0] // KT-5622
1
>>> array(1, 2)[1]
2
>>> array(1, 2).get(0)
1
>>> intArray(1)[0]
1
@@ -0,0 +1,6 @@
>>> Integer.valueOf(42)
42
>>> Integer(239).intValue()
239
>>> java.lang.Long.MIN_VALUE as Any
-9223372036854775808