diff options
author | Marek Safar <marek.safar@gmail.com> | 2013-06-28 20:48:18 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2013-06-28 20:50:12 +0400 |
commit | a3bbc431418926f2c4803605359a9e26eb642cf7 (patch) | |
tree | 66c2c35c02e1f662ec2dca7c4846d122a7e9c906 /mcs/tests/gtest-274.cs | |
parent | 0f25b95bae82515d487f0aceb40f581770fe52df (diff) |
Fix generated generated code for implicit nullable conversions involving numeric binary promotion
Diffstat (limited to 'mcs/tests/gtest-274.cs')
-rw-r--r-- | mcs/tests/gtest-274.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mcs/tests/gtest-274.cs b/mcs/tests/gtest-274.cs index 5522a499f88..30f4d3c5b4a 100644 --- a/mcs/tests/gtest-274.cs +++ b/mcs/tests/gtest-274.cs @@ -45,9 +45,17 @@ public struct Baz } } +struct S +{ + public static implicit operator bool?(S arg) + { + throw new ApplicationException ("should not be called"); + } +} + class X { - public static void Main () + public static int Main () { int a = 3; int? b = a; @@ -67,5 +75,12 @@ class X Baz? z2 = (Baz?) f2; Baz? z3 = (Baz?) f3; Baz z4 = (Baz) f2; + + S? s = null; + bool? g = s; + if (g != null) + return 1; + + return 0; } } |