Test fixed (nullability)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user