Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cston committed Sep 18, 2024
1 parent eb352eb commit 8425e3f
Show file tree
Hide file tree
Showing 3 changed files with 605 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,6 @@ protected virtual void PropertySetter(BoundExpression node, BoundExpression rece
VisitReceiverAfterCall(receiver, setter);
}

// PROTOTYPE: Test all uses of this method.
// returns false if expression is not a property access
// or if the property has a backing field
// and accessed in a corresponding constructor
Expand Down
2 changes: 0 additions & 2 deletions src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,6 @@ static IEnumerable<Symbol> getAllMembersToBeDefaulted(Symbol requiredMember)
}
}

// PROTOTYPE: Why are we returning the auto-property backing field rather than using the property?
// VisitMemberAccess does the opposite. What are the implications of the inconsistency?
// PROTOTYPE: This check for BackingField seems too generous. Shouldn't we also check the appropriate accessors are missing or auto-implemented?
static Symbol getFieldSymbolToBeInitialized(Symbol requiredMember)
=> requiredMember is SourcePropertySymbol { IsAutoProperty: true } prop ? prop.BackingField : requiredMember; // PROTOTYPE: This is the only use of IsAutoProperty.
Expand Down
Loading

0 comments on commit 8425e3f

Please sign in to comment.