|
|
|
@ -79,6 +79,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
@@ -79,6 +79,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
|
|
|
|
|
Console.WriteLine(NoForeachDueToMultipleCurrentAccess(new List<int> { 1, 2, 3, 4, 5 })); |
|
|
|
|
Console.WriteLine(NoForeachCallWithSideEffect(new CustomClassEnumeratorWithIDisposable<int>())); |
|
|
|
|
LoopWithGotoRepeat(); |
|
|
|
|
Console.WriteLine("LoopFollowedByIf: {0}", LoopFollowedByIf()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void ForWithMultipleVariables() |
|
|
|
@ -246,5 +247,17 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
@@ -246,5 +247,17 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
|
|
|
|
|
} |
|
|
|
|
Console.WriteLine("after finally"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static int LoopFollowedByIf() |
|
|
|
|
{ |
|
|
|
|
int num = 0; |
|
|
|
|
while (num == 0) { |
|
|
|
|
num++; |
|
|
|
|
} |
|
|
|
|
if (num == 0) { |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
return num; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|