ID:2669054
 
Resolved
Using an expression like ++a?.b on a line by itself threw a "statement has no effect" warning incorrectly.
BYOND Version:514.1552
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 89.0.4389.114
Applies to:Dream Maker
Status: Resolved (514.1553)

This issue has been resolved.
Descriptive Problem Summary:
Trying to use atom?.variable-- (increment or decrement statements) will incorrectly throw a compiler warning.
Numbered Steps to Reproduce Problem:
1. Make da code.
2. Do a compile.
3. Be saddened.
Code Snippet (if applicable) to Reproduce Problem:
mob
var/stuff=0
proc/Thing()
src?.stuff--


Expected Results:
Compilation success without warnings about stuff that should compile just fine!
Actual Results:
Program.dm:4:warning: ?.(lhs): statement has no effect
Does the problem occur:
Every time? Or how often?
Every day all the time super often.
In other games?
Yep.
On other computers?
Probably?

When does the problem NOT occur?
When you don't use a nullable operator when incrementing/decrementing.
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.)
It's reported that this worked correctly in 514.1545

Workarounds:
Don't.
Lummox JR resolved issue with message:
Using an expression like ++a?.b on a line by itself threw a "statement has no effect" warning incorrectly.