https://d.puremagic.com/issues/show_bug.cgi?id=899


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Platform|x86                         |All
            Version|1.001                       |D2
         OS/Version|Windows                     |All


--- Comment #2 from [email protected] 2013-11-27 09:01:12 PST ---
Tested on DMD 2.064

import std.stdio;
struct Test {
    int field;
}
void main() {
    writeln(Test.field.offsetof); // works
}
class Class {
    void a() {
        writeln(Test.field.offsetof);  
        // Error: this for field needs to be type Test not type main.Class
    }
}
struct Struct {
    void a() {
        writeln(Test.field.offsetof);
        // Error: this for field needs to be type Test not type Struct
    }
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to