Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-548.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f732fed9d57baf5c2332d143966f04388c79640f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
            }
        }
    }
}