ID:2175332
 
BYOND Version:511.1363
Operating System:Linux
Web Browser:Chrome 54.0.2840.100
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary: initial() does not work with modified types

Numbered Steps to Reproduce Problem: See code

Code Snippet (if applicable) to Reproduce Problem:
/datum
var/foo = "foo"
var/bar = "bar"

/proc/print_initial(datum/D)
world.log << "foo=[json_encode(initial(D.foo))], bar=[json_encode(initial(D.bar))]"

/world/New()
print_initial(/datum)
print_initial(/datum{foo = "notfoo"})


Expected Results:
Either:
foo="foo", bar="bar"
foo="foo", bar="bar"

or:
foo="foo", bar="bar"
foo="notfoo", bar="bar"


Actual Results:
foo="foo", bar="bar"
foo=null, bar=null


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

When does the problem NOT occur? N/A

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Unknown

Workarounds: None
Possibly related:
/datum/var/foo = "foo"

/world/New()
var/datum/D = null
world.log << json_encode(initial(D.foo)) // null, NOT a runtime??


edit: apparently i'm dumb and forgot i already reported this in https://secure.byond.com/forum/?post=2173445; the main post still stands, modified types should *work* but don't (this report), null/wrong types should *fail* but don't (other report).