Help fixing Typecasting Bug (function in desc)
Posted: June 20th, 2022, 8:48 am
Extracted .j file and used a simple regex to find consecutive returns. Feast your eyes on the problem:
Found some guides and helpful info (see below).
Not clear how to fix given examples taking and returning a unit and the above is taking and returning different variable types.
Please help
Thank you!!
Code: Select all
function jt takes rect R returns unit
return R
return null
endfunction
Not clear how to fix given examples taking and returning a unit and the above is taking and returning different variable types.
Please help
Thank you!!
If at all helpful below is where the return bug func is used. Would appear to be for pathing.the way to fix it (IIRC):
This is an example for a return bug. It has 2 returns, 1 after the other.Code: Select all
function returnBug takes unit u returns unit return u return null endfunction
Now those are 2 functions, each returning 1 value.Code: Select all
function fix1 takes unit u returns unit return u endfunction function returnBug takes unit u returns unit call fix1(u) return u endfunction
Though I can't understand how it works, it keeps the maps working.
Spoiler: