[JS IR BE] support Char.rangeTo()

This commit is contained in:
Anton Bannykh
2018-09-18 15:41:38 +03:00
parent 89bec8ec59
commit 7d5a304cf6
30 changed files with 1 additions and 30 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
1 in 1.rangeTo(10)
1..10
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
9 in 0..9
val intRange = 0..9
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val b: Byte = 42
val c: Char = 'z'
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// Auto-generated by GenerateInRangeExpressionTestData. Do not edit!
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// Auto-generated by GenerateInRangeExpressionTestData. Do not edit!
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class Cell<T>(val value: T)
fun box(): String =
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JVM_IR or not
// IGNORE_BACKEND: JVM_IR
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JVM_IR or not
// IGNORE_BACKEND: JVM_IR
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JVM_IR or not
// IGNORE_BACKEND: JVM_IR
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
fun box(): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JVM_IR
const val M = Char.MAX_VALUE
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JVM_IR or not
// IGNORE_BACKEND: JVM_IR
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JVM_IR or not
// IGNORE_BACKEND: JVM_IR
@@ -1,5 +1,4 @@
// TODO: muted automatically, investigate should it be ran for JS_IR or not
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JVM_IR or not
// IGNORE_BACKEND: JVM_IR
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// CHECK_CASES_COUNT: function=intFoo count=3
// CHECK_IF_COUNT: function=intFoo count=0
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1333
package foo
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1332
// see KT-7683
// WhenTranslator must recognize KtWhenConditionInRange
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1281
package foo
+1 -1
View File
@@ -34,7 +34,7 @@ public class Char(value: Int) : Comparable<Char> {
public operator fun dec(): Char = Char(value - 1)
/** Creates a range from this value to the specified [other] value. */
public operator fun rangeTo(other: Char): CharRange = null!! // TODO
public operator fun rangeTo(other: Char): CharRange = CharRange(this, other)
/** Returns the value of this character as a `Byte`. */
public fun toByte(): Byte = value.toByte()