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/cs0165-3.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/cs0165-3.cs')
-rw-r--r-- | mcs/errors/cs0165-3.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mcs/errors/cs0165-3.cs b/mcs/errors/cs0165-3.cs new file mode 100644 index 00000000000..9703ea96412 --- /dev/null +++ b/mcs/errors/cs0165-3.cs @@ -0,0 +1,14 @@ +// cs0165.cs: Use of unassigned local variable 's' +// Line: 9 + +public class Test +{ + public static string Foo { + get { + string s; + if (0 == 1 && (s = "") == "a" || s == "") + return s; + return " "; + } + } +}
\ No newline at end of file |