Calling a built-in proc on a proc variable that has the same name as a built in proc leads to some oddness that can only be described by example:
Numbered Steps to Reproduce Problem:
Press wtf verb.
Have wtf moment.
Code Snippet (if applicable) to Reproduce Problem:
/client/verb/wtf()
var/list/output = list(1, 2, 3, 4, 5, 6, 7)
world << "\"[output.Join(", ")]\""
var/list/Output = list(1, 2, 3, 4, 5, 6, 7)
world << "\"[Output.Join(", ")]\""
Expected Results:
"1, 2, 3, 4, 5, 6, 7"
"1, 2, 3, 4, 5, 6, 7"
Actual Results:
3:warning: output: unused label
3:warning: Join: unused label
2:warning: output: variable defined but not used
", "
"1, 2, 3, 4, 5, 6, 7"
another fun example:
Code Snippet:
/client/verb/wtf()
var/list/output = list(1, 2, 3, 4, 5, 6, 7)
world << output.Join(", ")
var/list/Output = list(1, 2, 3, 4, 5, 6, 7)
world << Output.Join(", ")
Expected Results:
1, 2, 3, 4, 5, 6, 7
1, 2, 3, 4, 5, 6, 7
Actual Results:
3:error: Join: invalid expression
2:warning: output: variable defined but not used
This is likely compiler side given the warnings. I don't even want to know how broken the resulting opcodes are.
Did the problem NOT occur in any earlier versions? If so, what was the last version
Tested in 511.1385, happens there too. Didn't bother to go further.
I didn't test if it happens with other built in procs, or other types, or user defined datum procs.
Workarounds:
Clear the 6th bit of the first character of the variable name.
related as output() is a similar proc as these mentioned