-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[semi-auto-props]: Rename ContainsFieldKeyword, revise cases that should handle FieldKeywordBackingField #61310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
d8294b4
fb933fa
3cbceba
1d040e5
a2065df
68ac2ac
0201e82
2e3178d
a920eab
2d89cbd
b97c067
796c1ab
584fc64
7216776
b8ad16b
60cc818
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,6 +215,7 @@ private FieldSymbol GetActualField(Symbol member, NamedTypeSymbol type) | |
return (!eventSymbol.HasAssociatedField || ShouldIgnoreStructField(eventSymbol, eventSymbol.Type)) ? null : eventSymbol.AssociatedField.AsMember(type); | ||
case SymbolKind.Property: | ||
// PROTOTYPE(semi-auto-props): Review other event associated field callers and see if we have to do anything special for properties. | ||
// Everything is reviewed except FlowAnalysis. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer this to be carefully reviewed to make sure I'm not missing anything, as we later will rely on the prototype update that only FlowAnalysis is left.
333fred marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// Backing field for semi auto props are not included in GetMembers. | ||
if (member is SourcePropertySymbol property) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -592,13 +592,23 @@ protected sealed override ConstantValue MakeConstantValue(HashSet<SourceFieldSym | |
|
||
internal override void AfterAddingTypeMembersChecks(ConversionsBase conversions, BindingDiagnosticBag diagnostics) | ||
{ | ||
// This check prevents redundant ManagedAddr diagnostics on the underlying pointer field of a fixed-size buffer | ||
if (!IsFixedSizeBuffer) | ||
var type = Type; | ||
if (type.Kind != SymbolKind.PointerType && !IsFixedSizeBuffer) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which check?
Let me know if you prefer not checking it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry for the confusion. I was referring to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AlekseyTs At some point I had only |
||
{ | ||
Type.CheckAllConstraints(DeclaringCompilation, conversions, ErrorLocation, diagnostics); | ||
} | ||
Youssef1313 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
base.AfterAddingTypeMembersChecks(conversions, diagnostics); | ||
} | ||
|
||
internal void AfterAccessorBindingChecks() | ||
{ | ||
var type = Type; | ||
// This check prevents redundant ManagedAddr diagnostics on the underlying pointer field of a fixed-size buffer | ||
if (type.Kind == SymbolKind.PointerType && !IsFixedSizeBuffer) | ||
{ | ||
Type.CheckAllConstraints(DeclaringCompilation, new TypeConversions(this.ContainingAssembly.CorLibrary), ErrorLocation, DeclaringCompilation.AfterAccessorBindingDiagnostics); | ||
Youssef1313 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.