ID:2019868
 
Not a bug
BYOND Version:509
Operating System:Windows 10 Preview
Web Browser:Chrome 46.0.2486.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:
It appears as though a list which uses a variable as an index when using list() to create is read as a string instead. (code snippet will be more helpful)

Code Snippet (if applicable) to Reproduce Problem:
mob/verb/Test_List()
var/z = "a"
var/list/l = list(zzzzzzzzz = "?","b" = "?", "c" = "?")//This compiles but should not
for(var/v in l)
src << v
//Outputs: zzzzzzzzz
// b
// c

//Also

mob/verb/Test_List()
var/z = "a"
var/list/l = list(z = "?","b" = "?", "c" = "?")
for(var/v in l)
src << v
//Outputs: z
// b
// c


Expected Results:
A list should be created with the index which is referenced by variable equaling the variables value.


Actual Results:
Dream Maker appears to be reading variable reference as string.

Does the problem occur:
Every time? Or how often? Yes.
In other games? Not sure.
In other user accounts? Not sure.
On other computers? Not sure.

When does the problem NOT occur?
Doesn't occur when using list without values (e.g. list(z,"b","c") and can be worked around by forcing a string using quotations and brackets "[z]"

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.)
Not sure.

Workarounds:
"[z]"
This is a direct result of the way named arguments work in procs. To an extent, it's intentional.
In response to Lummox JR
Alright, was curious about whether or not it was meant to be like this (seemed like an odd thing to just randomly be a problem). Figured I'd make a report just to be safe. Thank you for the prompt reply.
Isn't this fully documented behavior in the reference?
Nadrew resolved issue (Not a bug)
In response to Super Saiyan X
Super Saiyan X wrote:
Isn't this fully documented behavior in the reference?

Yep

From the reference (list associations article):

The list() instruction may also be used to create associative lists.

Example:
var/list/lst = list("player" = "James Byond", "score" = 2000)
When the index values happen to be text strings that satisfy all the requirements for variable names, this may also be written in a convenient short-hand:

var/list/lst = list(player = "James Byond", score = 2000)
In other words, this is exactly the same syntax as for