ID:2304873
 
Resolved
Regression: Fixing operator overloads for datum-derived types like obj, etc. broke it for regular datums.
BYOND Version:512.1391
Operating System:N/A
Web Browser:N/A
Applies to:Dream Daemon
Status: Resolved (512.1392)

This issue has been resolved.
It seems to be that doing any kind of operator overloading on types based off of /datum directly now no longer work properly unless something was changed.

runtime error: type mismatch: /test (/test) << "Test"
proc name: Test (/mob/verb/Test)
usr: (src)
src: Bandock (/mob)
src.loc: null
call stack:
Bandock (/mob): Test()


The '/test' having /datum as it's parent type.
Is that 1390 or 1391, Bandock? And what code goes with that error?
In response to Lummox JR
1391 (the latest build)

Here's the current state of my test project (which worked previously before in some areas):
test
var
a as num
New(a)
src.a = a
proc
operator+=(test/V)
if(isnum(V))
a += V
operator<<(A)
world << "[A]\..."
return src
operator[](idx)
world << idx
return src

test_map
var
o_type
list/keys = list()
New(o_type)
src.o_type = o_type
proc
operator[](key)
for(var/test_mapkey/K in keys)
if(K.key == key && istype(K.val, o_type))
return K.val
operator[]=(key, val)
for(var/test_mapkey/K in keys)
if(K.key == key && istype(val, o_type))
K.val = val
return
if(istype(val, o_type))
keys += new/test_mapkey(key, val)

test_mapkey
var
key = ""
val
New(key, val)
src.key = key
src.val = val

mob
var
value = 0
proc
operator<<(A,value)
world << 3
return 2
operator+=()
world << "A"
verb
Test()
var/test/M = new()
// M << "Test" << "\n" << "Hello!\n"
// world << M[src]
M += 5 // This triggers a runtime error.
Test2() // This unaltered code also now triggers a runtime error.
var/test_map/TM = new/test_map(/mob)
TM["Source"] = src
world << TM["Source"]
Lummox JR resolved issue with message:
Regression: Fixing operator overloads for datum-derived types like obj, etc. broke it for regular datums.