Leonard would forfeit his $20 million salary at least for 18-19 and be illegible to sign with another team for a year. The Spurs would lose out in that the his salary would still count against the cap (assuming there would be any player(s) they want to sign in FA.)
This info is from the venerable Laker fan capologist Larry Coon's cap FAQ (first posted online in Usenet groups circa late 90s).
http://www.cbafaq.com/salarycap.htm#Q61
With the way things are going it isn't even a far fetched scenario at this point.