From 656fdf040cda9fefaefc6fd2f8c28ce1f76dad8c Mon Sep 17 00:00:00 2001 From: Julien Couvreur Date: Fri, 27 Dec 2019 12:55:49 -0800 Subject: [PATCH] Update extended-nameof-scope.md --- proposals/extended-nameof-scope.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proposals/extended-nameof-scope.md b/proposals/extended-nameof-scope.md index 60a34fa..f326a03 100644 --- a/proposals/extended-nameof-scope.md +++ b/proposals/extended-nameof-scope.md @@ -26,9 +26,13 @@ Within a `nameof` expression in attributes placed on the method or its parameter [Simple names](https://github.com/dotnet/csharplang/blob/master/spec/expressions.md#simple-names) +If `K` is zero and the *simple_name* appears within a `nameof` expression TODO... block and if the block's (or an enclosing block's) local variable declaration space (Declarations) contains a local variable, parameter or constant with name I, then the simple_name refers to that local variable, parameter or constant and is classified as a variable or value. + +If `K` is zero and the simple_name appears within the body of a generic method declaration and if that declaration includes a type parameter with name I, then the simple_name refers to that type parameter. + TODO [Scopes](https://github.com/dotnet/csharplang/blob/master/spec/basic-concepts.md#scopes) ## Related spec sections -- [Corresponding parameters](https://github.com/dotnet/csharplang/blob/master/spec/expressions.md#corresponding-parameters) +- [Declarations](https://github.com/dotnet/csharplang/blob/master/spec/basic-concepts.md#declarations)