diff --git a/proposals/extended-nameof-scope.md b/proposals/extended-nameof-scope.md index c7ac9ae..60a34fa 100644 --- a/proposals/extended-nameof-scope.md +++ b/proposals/extended-nameof-scope.md @@ -14,12 +14,20 @@ Attributes like `NotNullWhen` or `CallerExpression` need to refer to parameters, ## Detailed design -TODO +[Methods](https://github.com/dotnet/csharplang/blob/master/spec/classes.md#methods) + +The method's *type_parameters* are in scope throughout the *method_declaration*, and can be used to form types throughout that scope in *return_type*, *method_body*, and *type_parameter_constraints_clauses* but not in *attributes*, except within a `nameof` expression in *attributes*. [Method parameters](https://github.com/dotnet/csharplang/blob/master/spec/classes.md#method-parameters) +Names are introduced into this declaration space by the type parameter list and the formal parameter list of the method in `nameof` expressions in attributes placed on the method or its parameters. + +Within a `nameof` expression in attributes placed on the method or its parameters, formal parameters can be referenced by their identifiers in *simple_name* expressions. + [Simple names](https://github.com/dotnet/csharplang/blob/master/spec/expressions.md#simple-names) +TODO + [Scopes](https://github.com/dotnet/csharplang/blob/master/spec/basic-concepts.md#scopes) ## Related spec sections