Summary: Alias to members possible without "this" instance
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid, spec
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Tomasz SowiƄski <> 2010-08-01 07:56:10 
PDT ---
I'm tearing up bug 4533 to have member-related alias problems in a separate

You can alias members from *outside*:

class A {
    void foo() {}

alias goo;

This compiles. It fails only if goo is called but should fail already at the
alias declaration.

Also, Andrej Mitrovic found a similar issue documented, but not implemented:

In the docs (, there's this

void main() {
    struct S { static int i; }
    S s;

    alias s.i a;    // illegal, s.i is an expression
    alias S.i b;    // ok
    b = 4;        // sets S.i to 4

But this [illegal expression] will compile.

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

Reply via email to