[Observable] should be tested with semi-automatic properties in C# 14
Resolved 💬 2 comments Opened Nov 30, 2025 by gfraiteur Closed Nov 30, 2025
The [Observable] aspect has not been tested with C# 14 semi-automatic properties using the field keyword.
Background
C# 14 introduces semi-automatic properties that use the field keyword to access an auto-generated backing field:
public string Name
{
get => field;
set => field = value?.Trim() ?? throw new ArgumentNullException();
}
Required Testing
The [Observable] aspect in Metalama.Patterns.Observability needs testing with:
- Semi-automatic properties using
fieldkeyword - Dependency analysis of properties using
field - Change notification generation for
field-backed properties - Computed properties that depend on semi-automatic properties
Acceptance Criteria
- [ ] Add aspect tests for semi-automatic properties
- [ ] Verify
PropertyChangedevents are raised correctly - [ ] Verify dependency tracking works for computed properties depending on semi-automatic properties
- [ ] Document any limitations or special behaviors
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗