blob: 62ddd6d632fdab0c9acf6717e040bc321fd938a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
//
// Sample for bug 75674
//
using System;
using System.Collections;
class XX {
static void Metodo (Exception e)
{
if (e is NotImplementedException){
Console.WriteLine ("OK");
} else {
Console.WriteLine ("Fail");
}
}
static IEnumerable X ()
{
try {
throw new NotImplementedException ();
} catch (Exception e){
Metodo (e);
}
yield return 0;
}
public static void Main ()
{
foreach (int a in X ()){
}
}
}
|