diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2015-05-26 17:41:38 -0700 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2015-05-26 17:41:38 -0700 |
commit | b1d65ae5f855952aab37c39923ca5d5138ea09db (patch) | |
tree | 9ad2c1ff00ccb099785c63920d2ee386dddd77d6 /tests/src/JIT/jit64/regress/vsw/471729/test.cs | |
parent | 4d931ce9e79349733bb74389089b47d600a52fc3 (diff) | |
download | coreclr-b1d65ae5f855952aab37c39923ca5d5138ea09db.tar.gz coreclr-b1d65ae5f855952aab37c39923ca5d5138ea09db.tar.bz2 coreclr-b1d65ae5f855952aab37c39923ca5d5138ea09db.zip |
Import JIT tests.
This imports the remainder of the tests under JIT/jit64 that are able
to target CoreCLR.
Diffstat (limited to 'tests/src/JIT/jit64/regress/vsw/471729/test.cs')
-rw-r--r-- | tests/src/JIT/jit64/regress/vsw/471729/test.cs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/src/JIT/jit64/regress/vsw/471729/test.cs b/tests/src/JIT/jit64/regress/vsw/471729/test.cs new file mode 100644 index 0000000000..4585e760cf --- /dev/null +++ b/tests/src/JIT/jit64/regress/vsw/471729/test.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +internal static class Repro +{ + private struct S + { + public bool b; + public string s; + } + + private static S ReturnsS() + { + S s = new S(); + s.b = true; + s.s = "S"; + Console.WriteLine(s.s); + return s; + } + + private static void Test(bool f) + { + if (f) + { + throw new Exception(ReturnsS().s, new Exception(ReturnsS().s)); + } + else + { + Console.WriteLine("blah"); + } + } + + private static int Main() + { + int rc = 1; + try + { + Test(true); + Test(false); + } + catch + { + rc = 100; + } + + return rc; + } +} |