X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Fgtest-274.cs;h=30f4d3c5b4a53d02556a4f0205724850da3737d6;hb=56b3c007f428d93b7f230d58744393ad69e4ca63;hp=5522a499f888e435e74308951483cd73b37c2020;hpb=6b4c3f0d7247795b4e52e158df688895ff64884e;p=mono.git 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; } }