blob: 4628f153711fb17221e356b1859c70baff8ada56 (
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
|
//
// Check unary minus.
//
using System;
class X {
public static int Main ()
{
short a = -32768;
int b = -2147483648;
long c = -9223372036854775808;
sbyte d = -128;
object o = -(2147483648);
if (o.GetType () != typeof (long))
return 1;
o = -(uint)2147483648;
Console.WriteLine (o.GetType ());
if (o.GetType () != typeof (long))
return 2;
uint ui = (1);
byte b1 = (int)(0x30);
byte b2 = (int)0x30;
return 0;
}
}
|