December 30, 2004 Check for return bug | ||||
---|---|---|---|---|
| ||||
Hello all, Just reporting a small oddball compiler bug with DMD v0.109. This code will compile without warnings/errors, even though it is incorrect. If you take out the if (obj) return line, the compiler will correctly catch the error. Otherwise it incorrectly continues on. module test4; bool func() {return true;} bool func2() { Object obj; if (obj) return false; if (func()) { } } Thanks. :) Chris Newton |
Copyright © 1999-2021 by the D Language Foundation