Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

24 lines
342 B
C#

using System;
class Test
{
public static int Main ()
{
dynamic index = (uint) int.MaxValue + 1;
dynamic array = new int[] { 1, 2 };
try {
var a = array [index];
return 1;
} catch (System.OverflowException) {
}
try {
array[ulong.MaxValue] = 1;
return 2;
} catch (System.OverflowException) {
}
return 0;
}
}