Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-110.cs
1 //
2 // Special test case for the Compound Assignment for the
3 // second case (not the obvious one, but the one with 
4 // implicit casts)
5
6 using System;
7
8 namespace test
9 {
10         public class test
11         {
12                 static int test_method(int vv)
13                 {
14                         byte b = 45;
15
16                         // The cast below will force the expression into being
17                         // a byte, and we basically make an explicit cast from
18                         // the return of "<<" from int to byte (the right-side type
19                         // of the compound assignemtn)
20                         b |= (byte)(vv << 1);
21
22                         return b;
23                 }
24
25                 public static int Main ()
26                 {
27                         if (test_method (1) != 47)
28                                 return 1;
29                         return 0;
30                 }
31         }
32 }