Don <> changed:

           What    |Removed                     |Added
            Summary|deprecation isn't checked   |deprecation isn't checked
                   |inside forward referenced   |inside forward referenced
                   |is(typeof())                |typeof()

--- Comment #5 from Don <> 2012-02-16 12:28:46 PST ---
> Deprecation is most definitely not about declarations not existing. It is 
> about being an error to reference them.
Right, but is(typeof(X)) isn't a check if X exists, even though a popular idiom
is to use it for that purpose. Rather, it asks what type X has. And I think
that has to be considered as referencing X, and is therefore an error.
If it's not an error, it has to be able to provide a type, and that's a

static if (is(typeof(Z)  M)) {
    M we_are_relying_on_a_deprecated_variable;

deprecated int Z;

But it turns out that this bug has nothing to do with is().

alias typeof(Z) Q1; // compiles

deprecated int Z;

alias typeof(Z) Q2; // doesn't compile

In fact, it seems it doesn't even require deprecated:

alias typeof(Z1) Q1;
pragma(msg, Q1.stringof); // int

const int Z1;

alias typeof(Z1) R1;
pragma(msg, R1.stringof); // const(int)

and yet if you write const (int) Z1; it displays const(int) in both cases.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to