a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
24 lines
342 B
C#
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;
|
|
}
|
|
} |