ID:2033344
 
BYOND Version:509
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Chrome 48.0.2564.103
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
If you have an if that is badly indented like so:

if

DM will treat it as if it is double indented, but will not trigger compile errors for bad indentation. (how ever, will give a warning about the if having no effect(see ID:2033312))

This should lead to inconsistent indentation errors.


509 and 510.1322 both showed it.

/datum/subsystem/garbage_collector/proc/QueueForQueuing(datum/A)
if (!istype(A) || !isnull(A.gc_destroyed))
return
tobequeued += A
But this is consistent indentation. The whitespace here appears in multiples of 2. DM treats spaces and tabs as identical as far as indentation is concerned, so it's seeing the code like so:

/datum/subsystem/garbage_collector/proc/QueueForQueuing(datum/A)
if (!istype(A) || !isnull(A.gc_destroyed))
return
tobequeued += A

I suppose it would make some sense for DM to complain about mixing spaces and tabs in the same line, at least.
It appears in ones, no?
/datum/subsystem/garbage_collector/proc/QueueForQueuing(datum/A)
if (!istype(A) || !isnull(A.gc_destroyed)) // space then tab
return // two tabs
tobequeued += A // one tab

In response to GinjaNinja32
GinjaNinja32 wrote:
It appears in ones, no?

No. If you quote the original post, you'll see that the two lines that appear to be only indented once use a space followed by a tab; the middle line uses two tabs. Therefore DM sees them all as if they had used two spaces or two tabs.