B
Brian Kelly
Hi all,
The following code unfortunately compiles fine with VC++ 7.1 and the
/clr switch:
System::Type*
foo()
{
if (0)
{
throw 1;
}
}
Rather than throw a syntax error of "foo() must return a value", it
instead compiles fine and has the less-than-desirable implicit
behaviour of returning a null Type*. If you remove the "throw"
statement, the syntax error is caught by the compiler.
Can anyone confirm or deny? If this is a known bug already, is there a
planned fix date?
Thanks in advance!
Best regards,
Brian
The following code unfortunately compiles fine with VC++ 7.1 and the
/clr switch:
System::Type*
foo()
{
if (0)
{
throw 1;
}
}
Rather than throw a syntax error of "foo() must return a value", it
instead compiles fine and has the less-than-desirable implicit
behaviour of returning a null Type*. If you remove the "throw"
statement, the syntax error is caught by the compiler.
Can anyone confirm or deny? If this is a known bug already, is there a
planned fix date?
Thanks in advance!
Best regards,
Brian