polytronicgr / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

Change-and-assignment operators not working with properties #370

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Consider this:

    public static class Test
    {
        public class P { public bool A { get; set; } }

        public static void RunTest()
        {
            P p1 = new P() { A = false }, p2 = new P() { A = true };
            p1.A |= p2.A;
        }
    }

The last line gets translated to:

p1.get_A() |= p2.get_A();

Which won't work. It should translate to something like:

p1.set_A(p1.get_A() | p2.get_A());

Original issue reported on code.google.com by polofili...@gmail.com on 25 Sep 2014 at 8:50

GoogleCodeExporter commented 8 years ago
Also note that this issue, which is related:

https://code.google.com/p/sharpkit/issues/detail?id=277

Has been marked as "fixed" but does not appear to be fixed. The test case in 
the original post still reproduces the error.

Original comment by polofili...@gmail.com on 29 Sep 2014 at 3:35