[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// JET-72 Type inference doesn't work when iterating over ArrayList
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
abstract class Item(val room: Object) {
|
||||
abstract val name : String
|
||||
}
|
||||
|
||||
val items: ArrayList<Item> = ArrayList<Item>()
|
||||
|
||||
fun test(room : Object) {
|
||||
for(item: Item? in items) {
|
||||
if (item?.room === room) {
|
||||
// item?.room is not null
|
||||
System.out.println("You see " + item?.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user