I didn't have any problem using solc 0.5.0 (geth 1.9.3), but facing this problem after upgraded to 0.5.12 (geth 1.9.9).
After doing some research, I believe it is because of the changes to the transfer() function in solidity. But unfortunately I didn't get any error message when compiling.
So, I a very confused now, and didn't know if there is any where else I had made error.
Anyone know why solc is not complaining about error / obsolete functions()