Bug 12543 – Class.sizeof requires the Class' definition

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-08T00:56:00Z
Last change time
2015-06-17T21:03:32Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
monarchdodra

Comments

Comment #0 by monarchdodra — 2014-04-08T00:56:16Z
//---- 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
Comment #1 by k.hara.pg — 2014-04-08T02:42:48Z
Comment #2 by github-bugzilla — 2014-04-08T03:45:25Z
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
Comment #3 by github-bugzilla — 2015-03-30T06:10:46Z
Comment #4 by github-bugzilla — 2015-06-17T21:03:32Z