Summary
When a reload pulls a file back in to re-bind its active patches and one of that file's existing bodies no longer binds, an ordinary method is skipped with a reason that names what to pass (#3008). A get-only property's getter in the same situation is not covered: it fails with a compile error, so the run reports a Failed row for a file the reader never passed.
Observed
In the second test of #3044 (Run_OnlyTheHostChangesTheSignatureOfTheAddedMethodANewTypeCalls_NamesItsCalls):
- A type introduced by hot reload calls a method that hot reload added to an existing class, from an ordinary method (
Run) and from a get-only property (Answer).
- A later reload passes only the existing class's file and changes the added method's signature.
- The run pulls the new type's file back in.
Run is Skipped with the sibling reason (the diagnostic is CS7036). get_Answer is Failed with CS1061.
The test pins the warning and the old body's result, not these two rows.
Where it happens
OrdinaryMethodQueue calls ReappliedSiblingBodyGuard.DescribeSkipOrNull for existing methods of a pulled-in file (ReappliedSibling). That call is the only use of the guard.
- Getters take
PropertyGetterEmitter.AppendPropertyGetterEntry → PropertyGetterClassifier.TrySkipPropertyGetterByDecision, which never checks ReappliedSibling, so an unbound getter body reaches the shim and fails to compile.
Expected
A getter of a pulled-in file whose body no longer binds is skipped with the same reason as a method (MethodTransformSiblingBodyUnbound, or MethodTransformSiblingBodyBindsCompiledType naming the type whose file to pass), instead of failing the run.
Summary
When a reload pulls a file back in to re-bind its active patches and one of that file's existing bodies no longer binds, an ordinary method is skipped with a reason that names what to pass (#3008). A get-only property's getter in the same situation is not covered: it fails with a compile error, so the run reports a
Failedrow for a file the reader never passed.Observed
In the second test of #3044 (
Run_OnlyTheHostChangesTheSignatureOfTheAddedMethodANewTypeCalls_NamesItsCalls):Run) and from a get-only property (Answer).RunisSkippedwith the sibling reason (the diagnostic is CS7036).get_AnswerisFailedwith CS1061.The test pins the warning and the old body's result, not these two rows.
Where it happens
OrdinaryMethodQueuecallsReappliedSiblingBodyGuard.DescribeSkipOrNullfor existing methods of a pulled-in file (ReappliedSibling). That call is the only use of the guard.PropertyGetterEmitter.AppendPropertyGetterEntry→PropertyGetterClassifier.TrySkipPropertyGetterByDecision, which never checksReappliedSibling, so an unbound getter body reaches the shim and fails to compile.Expected
A getter of a pulled-in file whose body no longer binds is skipped with the same reason as a method (
MethodTransformSiblingBodyUnbound, orMethodTransformSiblingBodyBindsCompiledTypenaming the type whose file to pass), instead of failing the run.