diff options
Diffstat (limited to 'tests/src/Loader/classloader/regressions/dev10_889822/dev10_889822.cs')
-rw-r--r-- | tests/src/Loader/classloader/regressions/dev10_889822/dev10_889822.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/src/Loader/classloader/regressions/dev10_889822/dev10_889822.cs b/tests/src/Loader/classloader/regressions/dev10_889822/dev10_889822.cs new file mode 100644 index 0000000000..0b6d8dadb9 --- /dev/null +++ b/tests/src/Loader/classloader/regressions/dev10_889822/dev10_889822.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; + +interface IFoo { + void foo(); +} + +class My { + static int Main() + { + try { + IFoo s = null; + s.foo(); + } + catch (NullReferenceException) { + Console.WriteLine("Successfully caught a null reference exception."); + return 100; + } + + Console.WriteLine("Failed!!"); + return -1; + } +} |