blob: 385330dfa55463add509afdf7129f67eba45acd0 (
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
|
using System;
class X {
enum A : int {
a = 1, b, c
}
static int Main ()
{
int v = 1;
object foo = (v + A.a);
object foo2 = (1 + A.a);
if (foo.GetType ().ToString () != "X+A"){
Console.WriteLine ("Expression evaluator bug in E operator + (U x, E y)");
return 1;
}
if (foo2.GetType ().ToString () != "X+A"){
Console.WriteLine ("Constant folder bug in E operator + (U x, E y)");
return 2;
}
return 0;
}
}
|