Skip to content

Commit 6e3e2f4

Browse files
authored
mention invoking method in top-level statement situation
1 parent fed4bb2 commit 6e3e2f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

standard/attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ The file path may be affected by `#line` directives ([§6.5.8](lexical-structure
847847
848848
The attribute `System.Runtime.CompilerServices.CallerMemberNameAttribute` is allowed on optional parameters when there is a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) from `string` to the parameter’s type.
849849
850-
If a function invocation from a location within the body of a function member or within an attribute applied to the function member itself or its return type, parameters or type parameters in source code omits an optional parameter with the `CallerMemberNameAttribute`, then a string literal representing the name of that member is used as an argument to the invocation instead of the default parameter value.
850+
If a function invocation from a location within the body of a function member or within an attribute applied to the function member itself or its return type, parameters or type parameters in source code omits an optional parameter with the `CallerMemberNameAttribute`, then a string literal representing the name of that member is used as an argument to the invocation instead of the default parameter value. (In the case of a function invocation from a top-level statement (§top-level-statements), the member name is that generated by the implementation.)
851851
852852
For invocations that occur within generic methods, only the method name itself is used, without the type parameter list.
853853

0 commit comments

Comments
 (0)