dotnet / dotnet/csharpstandard

9.5.1: Confusing example

Open
#85 2 comments 0 reactions 0 assignees View on GitHub
type: clarity
Dominant language
C#
Stars
815
Forks
99
Avg merge
1d 14h
Merged PRs (30d)
16

Description

The example at the end of 10.5.1 could do with fleshing out:

> A type-name might identify a constructed type even though it doesn’t specify type parameters directly. This
> can occur where a type is nested within a generic class declaration, and the instance type of the
> containing declaration is implicitly used for name lookup (§16.4.9.7). [Example:
>
> ```
> class Outer
> {
> public class Inner {...}
> public Inner i; // Type of i is Outer.Inner
> }
> ```
>
> end example]

It's not clear to me what the example is of - is it saying that Inner is a constructed type, because its "full name" (in some sense) is `Outer.Inner`? Or is it only constructed when a type argument is specified, e.g. `Outer.Inner`?

Assigning to Mads as the most likely candidate to supply more text.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.