JS backend: made as intrinsic map accessing methods and fixed accessing to native map.

This commit is contained in:
develar
2013-08-06 17:24:48 +04:00
committed by Zalim Bashorov
parent be4e1b7599
commit 678f6601dd
5 changed files with 141 additions and 11 deletions
@@ -0,0 +1,13 @@
package foo
import java.util.*
native
val classes: Map<String, Any> = noImpl
native
val classesMutable: HashMap<String, String> = noImpl
fun box(): Boolean {
classesMutable["why"] = "?"
return classes["answer"] == 42 && classesMutable["why"] == "?"
}
@@ -0,0 +1,16 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var classes = {"answer": 42}, classesMutable = {};