File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -557,6 +557,7 @@ public override void VisitPropertyDeclaration(PropertyDeclarationSyntax node)
557
557
Debug . Assert ( visitorContext . returnLabel == null , "Return label must be null" ) ;
558
558
var returnLabel = visitorContext . labelTable . GetNewJumpLabel ( "return" ) ;
559
559
visitorContext . returnLabel = returnLabel ;
560
+ visitorContext . returnSymbol = null ;
560
561
561
562
visitorContext . uasmBuilder . AddJumpLabel ( setter . entryPoint ) ;
562
563
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ public int MyIntBackedProperty
25
25
get { return backingField ; }
26
26
set
27
27
{
28
+ if ( value == 222 )
29
+ return ;
30
+
28
31
MyIntProperty = value ;
29
32
backingField = value ;
30
33
}
@@ -85,6 +88,9 @@ public void ExecuteTests()
85
88
MyIntBackedProperty = 8 ;
86
89
tester . TestAssertion ( "Property manual setter" , MyIntProperty == 8 && MyIntBackedProperty == 8 ) ;
87
90
91
+ MyIntBackedProperty = 222 ;
92
+ tester . TestAssertion ( "Property setter return" , MyIntBackedProperty == 8 ) ;
93
+
88
94
PropertyTest [ ] selfArr = new PropertyTest [ ] { this } ;
89
95
90
96
selfArr [ 0 ] . MyIntProperty = 10 ;
You can’t perform that action at this time.
0 commit comments