enum scope

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 8 12:53:07 PDT 2014


On 6/8/2014 12:11 PM, Jacob Carlborg wrote:
> "An implicit member expression is an abbreviated way to access a member of a
> type, such as an enumeration case or a class method, in a context where type
> inference can determine the implied type. It has the following form:
>
>      .member name
>
> For example:
>
>      var x = MyEnumeration.SomeValue
>      x = .AnotherValue

I see, so it is using the type of the lvalue to guide the symbol resolution of 
the rvalue.

Andrei had proposed something like this a few years ago, but I talked him out of 
it :-)

(I felt it would play havoc with overload resolution.)



More information about the Digitalmars-d mailing list