Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / dtest-045.cs
1 using System;
2
3 class Test
4 {
5         public static int Main ()
6         {
7                 dynamic index = (uint) int.MaxValue + 1;
8                 dynamic array = new int[] { 1, 2 };
9
10                 try {
11                         var a = array [index];
12                         return 1;
13                 } catch (System.OverflowException) {
14                 }
15
16                 try {
17                         array[ulong.MaxValue] = 1;
18                         return 2;
19                 } catch (System.OverflowException) {
20                 }
21
22                 return 0;
23         }
24 }