ID:1891233
 
Not a bug
BYOND Version:507
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 38.0
Applies to:Dream Maker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
Using initial() with a list var seems to always produce null.

Numbered Steps to Reproduce Problem:
See snippet.

Code Snippet (if applicable) to Reproduce Problem:
/obj/example
var/list/example = list("some", "data")

/proc/doesnt_work()
var/obj/example/O = /obj/example
var/list/L = initial(O.example)


Expected Results:
Since the system has to store the list data somewhere in order to initialize new instances of the type, I'd expect that L should be assigned a brand new list containing the list data.

Actual Results:
L is null.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Haven't tried.
In other user accounts? Yes.
On other computers? I don't have another computer with DM.

When does the problem NOT occur?
Don't know.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Don't know.

Workarounds:
Don't know of any.
initial() isn't designed work for variables that contain object instances, i.e. anything made with the "new" keyword, which does include /list objects.
Kaiochao resolved issue (Not a bug)