[JS IR BE]: support dynamic_var["foo"] = "bar"

Used EQ origin to detect. Added a test to check dynamic_var = "bar" case
is not affected
This commit is contained in:
Anton Bannykh
2018-10-09 19:41:49 +03:00
parent 7afb81a7df
commit 8c6337f3f6
37 changed files with 8 additions and 36 deletions
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
operator fun HashMap<String, Int?>.set(index: String, elem: Int?) {
this.put(index, elem)
}
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
operator fun <K, V> MutableMap<K, V>.set(k : K, v : V) = put(k, v)
fun box() : String {
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JS_IR, JVM_IR
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JS_IR, JVM_IR
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: NATIVE
interface A : Set<String>
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box() : String{
val set = HashSet<String>()
set.add("foo")
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
fun contains(set: Set<Any>, x: Int): Boolean = when {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun foo() : Int =
try {
2
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun <K: Any, V: Any> foo(k: K, v: V) {
val map = HashMap<K, V>()
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val map: MutableMap<String, Int> = HashMap<String, Int>()
+1 -1
View File
@@ -1,4 +1,4 @@
// IGNORE_BACKEND: JS_IR, JVM_IR
// IGNORE_BACKEND: JVM_IR
fun box() : String {
if (!testIteratingOverMap1()) return "fail 1"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
fun box(): String {
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
object O {
val mmmap = HashMap<String, Int>();
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
fun box(): String {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
fun box(): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
val targetNameLists: Map<String, String> = mapOf("1" to "OK")
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
package whats.the.difference
fun iarray(vararg a : Int) = a // BUG