added support for map[key] = value on java.util.Map

This commit is contained in:
James Strachan
2012-01-04 16:14:49 +00:00
parent 1cd8f3c2ba
commit e73e81c526
3 changed files with 21 additions and 10 deletions
+5 -10
View File
@@ -120,7 +120,6 @@ class Body() : BodyTag("body") {
fun a(href : String, init : A.()-> Unit) {
val a = initTag(init)
a.href = href
a.attributes.put("href", href)
}
}
@@ -146,15 +145,11 @@ class A() : BodyTag("a") {
override fun create() = A()
}
var href: String? = null
/*
TODO this doesn't compile
see http://youtrack.jetbrains.net/issue/KT-866
var href : String
get() = attributes["href"]
set(value) { attributes["href"] = value }
*/
var href : String
get() = attributes["href"]
set(value) {
attributes["href"] = value
}
}
fun body(init: Body.()-> Unit): Body {