[Issue 2202] Error getting type of non-static member of a class

Max Samukha maxter at ukr.net
Wed Jul 9 08:43:49 PDT 2008


On Wed, 9 Jul 2008 09:31:13 -0400, "Jarrett Billingsley"
<kb3ctd2 at yahoo.com> wrote:

><d-bugmail at puremagic.com> wrote in message 
>news:g51hs4$rq7$1 at digitalmars.com...
>> http://d.puremagic.com/issues/show_bug.cgi?id=2202
>>
>>
>>
>>
>>
>> ------- Comment #6 from samukha at voliacable.com  2008-07-09 00:21 -------
>>> It's supposed to take an expression. C.x is an expression.
>>
>> C.x is not a valid expression?
>
>What's it supposed to give?  It's an instance variable.  It's syntactically 
>an expression, but semantically it makes no sense, it has no value.
>

Sometimes I just fail to express myself. I should have asked "C.x is
not a valid expression, is it?", or better: "C.x is an invalid
expression, isn't it?"  Or something like that.

>Interestingly, &C.method works.  Thankfully.  Hope that never breaks.  But 
>that's maybe because functions are statically allocated, unlike instance 
>variables. 
>

I rely on &C.method too.



More information about the Digitalmars-d-bugs mailing list