mgusmano / sharpkit

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

Increment/Decrement operator on property yields ReferenceError: Invalid left-hand side expression in postfix operation #260

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
public int Foo { get; set; }

public int GetNextFoo()
{
   return Foo++;
}

compiles to 

ctor: function()
{
   this.Foo = 0;
},
get_Foo: function()
{
   return this.Foo;
},
GetNextFoo: function()
{
   return this.get_Foo()++;
}

which throws exception because there is an implicit call to the setter that is 
not implemented.

Original issue reported on code.google.com by yvan.rod...@gmail.com on 10 Dec 2012 at 9:55

GoogleCodeExporter commented 8 years ago

Original comment by DanelK...@gmail.com on 24 Jun 2013 at 1:04