[Mono-bugs] [Bug 348255] Bug in turnary operator + nullable types
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Dec 24 04:25:57 EST 2007
https://bugzilla.novell.com/show_bug.cgi?id=348255
User msafar at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=348255#c3
--- Comment #3 from Marek Safar <msafar at novell.com> 2007-12-24 02:25:56 MST ---
Following code snippets are not equivalent, they may result in same IL code but
they have different rules, mainly because the second one, conditional (ternary)
operator, is an expression. Therefore the operands are in relation which is not
the case for if/else statement.
if (foo)
return 1;
else
return 2;
and
return foo ? 1 : 2;
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list