ID:2220240
 
BYOND Version:510
Operating System:Windows 10 Pro 64-bit
Web Browser:Firefox 51.0
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:

Compilation fails with "error: bad constant" under certain conditions while using newlist. This also applies to 511.1375

Code Snippet (if applicable) to Reproduce Problem:

The following code will compile in an empty dme:
/datum
var/z

/proc/y()
return newlist(/datum{z = /obj})


However, this code won't:
/datum/x
var/z

/proc/y()
return newlist(/datum/x{z = /obj})


Expected Results:
Both snippets compile

Actual Results:
The second snippet never compiles

Various tweaks can cause compilation to succeed. E.g. Defining an /obj derivative BEFORE proc/y but not AFTER

UPDATE: With some further investigation, the culprit is not newlist, rather with how byond handles the listed definitions