ID:2513020
 
Resolved
The ?. operator didn't handle some complex situations properly where it was the left-hand side of an expression and that expression was in turn the right-hand side of another. This is a compiler fix.
BYOND Version:512
Operating System:Windows 7 Pro
Web Browser:Firefox 69.0
Applies to:Dream Maker
Status: Resolved (512.1488)

This issue has been resolved.
Descriptive Problem Summary:
There is a reproducible crash in byondcore when using the ?. operator.

Affects 512.1484 and 1485, possible introduced by the fix for http://www.byond.com/forum/post/2509137

Example:
https://github.com/tgstation/tgstation/blob/master/code/ modules/mining/machine_redemption.dm#L259

https://github.com/tgstation/tgstation/issues/46804

I'm working on making a small test case.

Crash report: https://file.house/ep7B.txt

Minidump is available, just pm me to grab it.
Minimal reproduction:
/datum/test
    var/z = 0

mob
    Login()
        var/datum/test/invalid = null
        var/result = (invalid?.z = 2)
        world << "Boo"
Lummox JR resolved issue with message:
The ?. operator didn't handle some complex situations properly where it was the left-hand side of an expression and that expression was in turn the right-hand side of another. This is a compiler fix.
Oddly I didn't get a crash in this case, just a proc stack underflow runtime error. But I definitely confirmed there was a bug.