ID:2266463
 
Resolved
The compiler allowed .. to be used as if it were a var, creating malformed code.
BYOND Version:511
Operating System:Windows Server 2016 x64
Web Browser:Chrome 61.0.3150.0
Applies to:Dream Maker
Status: Resolved (512.1386)

This issue has been resolved.
Descriptive Problem Summary:
Returning .. instead of ..() in an overridden proc crashes DreamDaemon.

Numbered Steps to Reproduce Problem:
1. Make a proc.
2. Override it.
3. Return .. instead of ..()

Code Snippet (if applicable) to Reproduce Problem:
world
fps = 25

/datum/thing/proc/foo()
world << "foo"
return "foo"

/datum/thing/other/foo()
world << "otherfoo"
return ..

/client/verb/call_foo()
var/datum/thing/T = new
var/datum/thing/other/O = new

usr << "Calling datum/thing"
T.foo()
usr << "Calling datum/thing/other"
O.foo()


Expected Results:
Project to fail compile or runtime.

Actual Results:
Project compiles and DreamDaemon crashes when return .. is encountered.

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

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.)
Tried both 511.1385 and 510.1347, both crashed.
Odd. It's an easily avoidable crash obviously, but I'll take a look and see if I can plug that up.
Attempting to put super in a string crashes out the engine.

mob
verb
test()
world.log << "[..]"


...I was looking at things. Doing my usual breaking things to figure out how stuff works internally. One of my theories didn't pan out. Whole thing came crashing down.

It's not the output though.

mob
Login()
. = ..()

verb
test()
return "[..]"


The above also crashes out the engine. Purely the attempt to put the value in a string.
In response to Ter13
Weird issue for sure. I found the problem and it's actually on the compiler's end, so I'll change this to a DM issue.

The compiler doesn't really understand that .. is only ever used for the ..() call and therefore doesn't plan for other cases. The result is malformed code that DD gets confused by. This will be fixed in 512.
In response to Ter13
I'm so glad you are getting ballsy and diving into that compiler.
In response to Ter13
Probably the same thing that's happening here: http://www.byond.com/forum/?post=2266463
Well caught, Skull132. I've reattached the issue as the two are related.
Lummox JR resolved issue with message:
The compiler allowed .. to be used as if it were a var, creating malformed code.