-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Milestone
Description
Proposal: dotnet/csharplang#287
Spec: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-10.0/caller-argument-expression.md
General Concerns
- LangVersion - No lang version impact for caller info attributes.
- VB Interop
- VB does case-insensitive identifier matching
- VB emits correct casing, regardless of user's casing in source
- Update spec with implicit conversion rules
- Remove feature flag after Aleksey reviews.
Semantics
- Syntax is reflected exactly
- Leading comments ignored
- Trailing comments ignored
- Middle comments included
- Leading pragmas ignored
- Trailing pragmas ignored
- Middle pragmas included
- Parameter remapping
- Extension methods
- Info of
thisparameter - Info of non-
thisparameter
- Info of
- Delegate Invoke
- Delegate BeginInvoke
- Delegate EndInvoke
- Extension methods
- Overridden by existing caller info attributes
- CallerFilePathAttribute
- CallerLineNumberAttribute
- CallerMemberNameAttribute
- Self-referential attribute
- Explicit argument reordering
- Applied multiple times
- Invalid parameter name
- No default value provided for parameter
- Referenced parameter uses default value
- Attribute added to overridden method
- Attribute removed from overridden method
- Attribute applied to type with implicit conversion from string
- Reference conversion
- User-defined conversion
- No conversion
- Compiler generated calls with user-written code
- Extension GetEnumerator
- Extension Deconstruct
- Implicit Index/Slice (should be default)
- Extension GetAwaiter
- Ref/out parameters
- Out variable declarations
- Out discards
- Implicit base constructor calls (should be ignored, like other Caller info attributes)
Open issues:
- could we add
CallerArgumentExpressiontoDebug.Assertand have that new overload get picked?
FYI @Youssef1313
Reactions are currently unavailable