www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 899] New: structure field .sizeof property inaccessible in the scope

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=899

           Summary: structure field .sizeof property inaccessible in the
                    scope
           Product: D
           Version: 1.001
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thecybershadow gmail.com


import std.stdio;

struct Test
{
    int field;
}

void main()
{
    writefln(Test.field.offsetof);  // works
}

class Class
{
    this()
    {
        writefln(Test.field.offsetof);  
        // Error: this for field needs to be type Test not type bug2.Class
        // class bug2.Class member field is not accessible
    }
}


-- 
Jan 28 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=899


Vladimir <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |malagana15 yahoo.es





PDT ---
*** Issue 2302 has been marked as a duplicate of this issue. ***

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