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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 8 03:16:17 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2202





------- Comment #2 from samukha at voliacable.com  2008-07-08 05:16 -------
I'm not sure either as it worked before but is not mentioned in the specs. I
wouldn't post it as bug if the following compiled:

static assert (!is(typeof(C.x))); // Fails with the same error, should pass
static assert (!__traits(compiles, C.x)); // Should pass

... and if this didn't compile:
struct S
{
   int x;
}

typeof(S.x) y; // Why this compiles then?

So it is either a regression or we have other bugs and inconsistencies.


-- 



More information about the Digitalmars-d-bugs mailing list