diff options
author | Marek Safar <marek.safar@gmail.com> | 2004-12-06 11:43:22 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2004-12-06 11:43:22 +0300 |
commit | f1f8ed486d6f87b227ce94247bbcd310915de9b8 (patch) | |
tree | e1ba67b585c8ce14e2f629de687b5fadae672083 /mcs/errors/cs0429-2.cs | |
parent | d88ab529830390ca45d9222f6f8fa83f0cc0f56c (diff) |
2004-12-06 Marek Safar <marek.safar@seznam.cz>
Fixed #69195, #56821
* ecore.cs (ResolveBoolean): Tiny refactoring.
* expression.cs (Binary.DoResolve): Add warning 429 and skipping
of right expression resolving when left is false constant and
operator is LogicalAnd OR true constant and operator is LogicalOr.
* statement.cs (ResolveUnreachable): Always reports warning.
svn path=/trunk/mcs/; revision=37173
Diffstat (limited to 'mcs/errors/cs0429-2.cs')
-rw-r--r-- | mcs/errors/cs0429-2.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mcs/errors/cs0429-2.cs b/mcs/errors/cs0429-2.cs new file mode 100644 index 00000000000..7d9423ea4c7 --- /dev/null +++ b/mcs/errors/cs0429-2.cs @@ -0,0 +1,14 @@ +// cs0429.cs: Unreachable expression code detected +// Line: 11 +// Compiler options: -warn:4 -warnaserror + +using System; + +class Main +{ + public void Method (int i) + { + if (5 == 5 || i > 10) + Console.WriteLine ("TEST"); + } +} |