Thread overview
[Issue 12543] New: Class.sizeof requires the Class' definition
Apr 08, 2014
Kenji Hara
Apr 08, 2014
Andrej Mitrovic
April 08, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12543

           Summary: Class.sizeof requires the Class' definition
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: monarchdodra@gmail.com


--- Comment #0 from monarchdodra@gmail.com 2014-04-08 00:56:16 PDT ---
//----
class SomeClass;
pragma(msg, SomeClass.sizeof);
//----
Error: class main.SomeClass is forward referenced when looking for 'sizeof'
//----

AFAIK, you don't need to know about SomeClass, to know it's size is that of object, eg, size_t.

See also: https://d.puremagic.com/issues/show_bug.cgi?id=12540 https://github.com/D-Programming-Language/phobos/pull/2074

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 08, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12543


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
            Version|unspecified                 |D2


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2014-04-08 02:42:48 PDT ---
https://github.com/D-Programming-Language/dmd/pull/3437

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 08, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12543



--- Comment #2 from github-bugzilla@puremagic.com 2014-04-08 03:45:25 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f3fea81596aa0bdb4e194f4acf480a4be07ce926 fix Issue 12543 - Class.sizeof requires the Class' definition

https://github.com/D-Programming-Language/dmd/commit/1d8d43ab90df75f8eba875ac02abc352a3cf64f9 Merge pull request #3437 from 9rnsr/fix12543

Issue 12543 - Class.sizeof requires the Class' definition

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 08, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12543


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich@gmail.com
         Resolution|                            |FIXED


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