Test fixed (nullability)

This commit is contained in:
Andrey Breslav
2012-01-30 22:12:03 +04:00
parent 5595e55ab9
commit 7a7db291cc
3 changed files with 5 additions and 5 deletions
@@ -132,7 +132,7 @@ class LI() : BodyTag("li")
class P() : BodyTag("p")
class H1() : BodyTag("h1")
class A() : BodyTag("a") {
public var href : String
public var href : String?
get() = attributes["href"]
set(value) {
attributes["href"] = value
@@ -10,9 +10,9 @@ abstract class Item(val room: Object) {
val items: ArrayList<Item> = ArrayList<Item>
fun test(room : Object) {
for(val item: Item in items) {
if (item.room === room) {
System.out?.println("You see " + item.name)
for(val item: Item? in items) {
if (item?.room === room) {
System.out?.println("You see " + item?.name)
}
}
}