fjgandrade / sharpkit

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

Multiple property setters on one line #166

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
static int a;
static int b;

public static int A
{
    get
    {
        return a;
    }
    set
    {
        a = value;
    }
}

public static int B
{
    get
    {
        return b;
    }
    set
    {
        b = value;
    }
}

static void btnTest_click(HtmlDomEventArgs e)
{
    J(document.body).append("Hello world<br/>");

    A = B = 5;

    J(document.body).append(string.Format("A = {0}, B = {1}", A, B));
}

/*Generated by SharpKit 5 v4.28.4000*/
function btnTest_click(e)
{
    $(document.body).append("Hello world<br/>");
    set_A(set_B(5));
    $(document.body).append(System.String.Format$$String$$Object$$Object("A = {0}, B = {1}",get_A(),get_B()));
};

This causes the output as 

A = undefined, B = 5

From the JavaScript it's assigning the result of the B setter to A. It works OK 
with automatic properties.

Original issue reported on code.google.com by co...@gravill.com on 10 Jul 2012 at 2:28

GoogleCodeExporter commented 9 years ago
I think it will fix after native getter and setter implemented
http://code.google.com/p/sharpkit/issues/detail?id=181&colspec=ID%20Type%20Statu
s%20Priority%20v%20Summary

Original comment by Madnik7@gmail.com on 14 Aug 2012 at 9:35

GoogleCodeExporter commented 9 years ago

Original comment by DanelK...@gmail.com on 21 Aug 2012 at 2:10

GoogleCodeExporter commented 9 years ago

Original comment by DanelK...@gmail.com on 21 Jun 2013 at 4:56