?[] doesnt always work as expected
Numbered Steps to Reproduce Problem:
snippets
Code Snippet (if applicable) to Reproduce Problem:
//Actual structure would look like this
var/list/dat = list("test" = list("item" = 5))
//compiles
var/list/dat
world.log << dat?["test"]
//compiles
var/list/dat
world.log << dat?["test"]?["item"]
//doesnt compile
var/list/dat
world.log << dat?["test"]["item"]
Expected Results:
It compiles
Actual Results:
code.dm:4:error: ?:: invalid expression
code.dm:3:warning: dat: variable defined but not used
Does the problem occur:
Every time? Or how often?
Yes
In other games?
Yes
In other user accounts?
Yes
On other computers?
Yes
When does the problem NOT occur?
Not using ?[] or writing it twice
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.)
Since always it seems
Workarounds:
Not using ?[]