ID:2672736
 
Resolved
Regression: the ?. operator stopped working correctly with lists, throwing a bogus compiler error.
BYOND Version:514.1553
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 90.0.4430.72
Applies to:Dream Maker
Status: Resolved (514.1554)

This issue has been resolved.
Descriptive Problem Summary:
Lists vars/procs accessed through conditional operators are bunked

Numbered Steps to Reproduce Problem:
Try code snippet below

Code Snippet (if applicable) to Reproduce Problem:
/datum/foo
var/list/xyzzy = new

/datum/foo/proc/bar()
xyzzy?.len = 0
xyzzy?.Cut()
// also the below two when given args
// xyzzy?.Find(baz)
// xyzz?.Remove(baz)


Expected Results:
not broken
Actual Results:

delme.dm:65:error: .len: undefined var

Does the problem occur:
Every time? Or how often? y
In other games? y
In other user accounts? unk
On other computers? unk

When does the problem NOT occur?
earlier versions
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.)
yes, last version

Workarounds:
nope
Lummox JR resolved issue with message:
Regression: the ?. operator stopped working correctly with lists, throwing a bogus compiler error.
When can we expect this to drop on beta? I don't honestly feel like reverting a whole bunch of code, just to re-apply it after.
In response to Laser50
I'm working on it, but you can compile with 1552 in the meantime.

Login to reply.