mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
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
13 lines
200 B
C#
13 lines
200 B
C#
// cs0429.cs: Unreachable expression code detected
|
|
// Line: 9
|
|
// Compiler options: -warn:4 -warnaserror
|
|
|
|
class Main
|
|
{
|
|
public void Method (int i)
|
|
{
|
|
if (false && i > 10)
|
|
return;
|
|
}
|
|
}
|