Test fixed (nullability)
This commit is contained in:
@@ -132,7 +132,7 @@ class LI() : BodyTag("li")
|
|||||||
class P() : BodyTag("p")
|
class P() : BodyTag("p")
|
||||||
class H1() : BodyTag("h1")
|
class H1() : BodyTag("h1")
|
||||||
class A() : BodyTag("a") {
|
class A() : BodyTag("a") {
|
||||||
public var href : String
|
public var href : String?
|
||||||
get() = attributes["href"]
|
get() = attributes["href"]
|
||||||
set(value) {
|
set(value) {
|
||||||
attributes["href"] = value
|
attributes["href"] = value
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ abstract class Item(val room: Object) {
|
|||||||
val items: ArrayList<Item> = ArrayList<Item>
|
val items: ArrayList<Item> = ArrayList<Item>
|
||||||
|
|
||||||
fun test(room : Object) {
|
fun test(room : Object) {
|
||||||
for(val item: Item in items) {
|
for(val item: Item? in items) {
|
||||||
if (item.room === room) {
|
if (item?.room === room) {
|
||||||
System.out?.println("You see " + item.name)
|
System.out?.println("You see " + item?.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ html {
|
|||||||
// content generated by
|
// content generated by
|
||||||
p {
|
p {
|
||||||
for (arg in args)
|
for (arg in args)
|
||||||
+arg
|
+arg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user