ID:2770928
 
Resolved
The typesof() change had an issue in certain cases that wasn't immediately obvious in testing.
BYOND Version:514
Operating System:Windows 10 Home 64-bit
Web Browser:Firefox 97.0
Applies to:Dream Daemon
Status: Resolved (514.1580)

This issue has been resolved.
Descriptive Problem Summary:
The recent changes to typesof seem to make it return incorrect types.
Code Snippet (if applicable) to Reproduce Problem:
datum/type
var/name = "default type"

datum/type/new1
name = "new1"

datum/type/new2
name = "new2"

datum/type/new3
name = "new3"

world/New()
..()
var/list/paths = typesof(/datum/type) -/datum/type
for(var/path in paths)
var/datum/type/new_type = new path
world.log << "[new_type.name]"


Expected Results:
new1
new2
new3
Actual Results:
new1
new1
new2
new3
Does the problem occur:
Every time? Or how often?
N/A
In other games?
Yes.
In other user accounts?
N/A
On other computers?
N/A

When does the problem NOT occur?
Always occurs.

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.)
The previous version.

Workarounds:
N/A

In my actual project, it also fails to include a few subtypes. Though I couldn't reproduce it in the test case.
Lummox JR resolved issue with message:
The typesof() change had an issue in certain cases that wasn't immediately obvious in testing.