File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -557,6 +557,7 @@ public override void VisitPropertyDeclaration(PropertyDeclarationSyntax node)
557557 Debug . Assert ( visitorContext . returnLabel == null , "Return label must be null" ) ;
558558 var returnLabel = visitorContext . labelTable . GetNewJumpLabel ( "return" ) ;
559559 visitorContext . returnLabel = returnLabel ;
560+ visitorContext . returnSymbol = null ;
560561
561562 visitorContext . uasmBuilder . AddJumpLabel ( setter . entryPoint ) ;
562563
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ public int MyIntBackedProperty
2525 get { return backingField ; }
2626 set
2727 {
28+ if ( value == 222 )
29+ return ;
30+
2831 MyIntProperty = value ;
2932 backingField = value ;
3033 }
@@ -85,6 +88,9 @@ public void ExecuteTests()
8588 MyIntBackedProperty = 8 ;
8689 tester . TestAssertion ( "Property manual setter" , MyIntProperty == 8 && MyIntBackedProperty == 8 ) ;
8790
91+ MyIntBackedProperty = 222 ;
92+ tester . TestAssertion ( "Property setter return" , MyIntBackedProperty == 8 ) ;
93+
8894 PropertyTest [ ] selfArr = new PropertyTest [ ] { this } ;
8995
9096 selfArr [ 0 ] . MyIntProperty = 10 ;
You can’t perform that action at this time.
0 commit comments