Adding empty list to existing list does nothing
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
mob
Login()
var/list/L = list(new/list(), list())
world << "A [length(L)]"
L.Add(list())
world << "B [length(L)]"
L.Add(new/list())
world << "C [length(L)]"
var/list/X = list()
L.Add(X)
world << "D [length(L)]"
Expected Results:
A 2
B 3
C 4
D 5
Actual Results:
A 2
B 2
C 2
D 2
list.Add() concatenates lists; it adds the contents of lists passed to it, not the lists themselves. It doesn't add them as elements. Adding nothing to a list has no effect, as you'd expect.
If you want to add a list as an element of another list, you'd have to do this:
L[++L.len] = new/list