Better error message for currently unsupported issue 8318
fix Issue 10007 - function overrides but is not covariant
fix bugs found by valgrind
Merge pull request #1973 from 9rnsr/fix10007

Issue 10007 - function overrides but is not covariant
Merge pull request #2508 from WalterBright/valgrind

fix bugs found by valgrind