Update dependencies from https://github.com/dotnet/arcade build 20190729.1 (#15881)
[mono-project.git] / mcs / tests / test-196.cs
blob98ea4e5db4e6f297c009e76d91a292f53005fe3b
1 //
2 // Tests related to constants and binary operators (bug 39018)
3 //
5 class X {
6 void Bug1 () {
7 uint a = 1, b = 2;
8 long l = (b & (0x1 << 31));
11 void Bug2 () {
12 uint a = 1, b = 2;
13 const int l = 1;
14 const int r = 31;
16 long ll = (b & (l << r));
19 public static int Main ()
21 const byte b = 255;
22 const int i = b << int.MaxValue;
23 const int i2 = b << int.MaxValue;
25 long token = uint.MaxValue;
26 const int column_mask = (int)((1 << 32) - 1);
27 int r2 = (int) (token & column_mask);
28 if (r2 != 0)
29 return 1;
31 return 0;