Andrei Alexandrescu:
class Foo { }class Bar { Foo f; void bar() { //variable was wrongly commented here //bool f = true; if(f) { //Oops! } } }If uncommented that would make for a shadow definition error.
Are you saying this code gives or should give errors? class Foo {} class Bar { Foo f; void bar() { bool f = true; if (f) {} } } void main() {} Bye, bearophile