diff options
author | Marek Safar <marek.safar@gmail.com> | 2006-12-20 15:06:17 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2006-12-20 15:06:17 +0300 |
commit | a729ae7d02fcf2fdf41e149d0d9c4b1bef2ab973 (patch) | |
tree | b6929dca07fd7d5890e9c5fc8d6a30d08ad8245c /mcs/tests/test-548.cs | |
parent | 02393cd98e1e9e2811de1385e850148d2b1cfed2 (diff) |
New test based on #80288
svn path=/trunk/mcs/; revision=69807
Diffstat (limited to 'mcs/tests/test-548.cs')
-rw-r--r-- | mcs/tests/test-548.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mcs/tests/test-548.cs b/mcs/tests/test-548.cs new file mode 100644 index 00000000000..f732fed9d57 --- /dev/null +++ b/mcs/tests/test-548.cs @@ -0,0 +1,37 @@ +using System; + +namespace Bugs +{ + class Bug0 + { + struct MyBoolean + { + private bool value; + public MyBoolean(bool value) + { + this.value = value; + } + public static implicit operator MyBoolean(bool value) + { + return new MyBoolean(value); + } + public static implicit operator bool(MyBoolean b) + { + return b.value; + } + } + + public static int Main() + { + MyBoolean b = true; + if (true && b) + { + return 0; + } + else + { + return 100; + } + } + } +}
\ No newline at end of file |