www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 379] New: wrong thisptr type in typedef'ed struct

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

           Summary: wrong thisptr type in typedef'ed struct
           Product: D
           Version: 0.167
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: h3r3tic mat.uni.torun.pl


struct Foo {
        void foo() {
        }
}

typedef Foo Bar;


void main() {
        Bar a;
        a.foo();
}



 this for foo needs to be type Foo not type Bar
--
Sep 27 2006
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail puremagic.com schrieb am 2006-09-27:
 http://d.puremagic.com/issues/show_bug.cgi?id=379
 struct Foo {
         void foo() {
         }
 }

 typedef Foo Bar;


 void main() {
         Bar a;
         a.foo();
 }

 this for foo needs to be type Foo not type Bar
test case: http://dstress.kuehne.cn/run/t/typedef_07_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFHM1ELK5blCcjpWoRAriCAJ4ugxK4pe+lJvgUQfsn5aZMBRb0jQCgrYm+ rqNcMUpIDQS07De5cEywqJs= =oOxE -----END PGP SIGNATURE-----
Sep 29 2006
prev sibling next sibling parent reply Tomas Lindquist Olsen <tomas famolsen.dk> writes:
d-bugmail puremagic.com wrote:
 http://d.puremagic.com/issues/show_bug.cgi?id=379
 
            Summary: wrong thisptr type in typedef'ed struct
            Product: D
            Version: 0.167
           Platform: PC
         OS/Version: Windows
             Status: NEW
           Keywords: rejects-valid
           Severity: normal
           Priority: P2
          Component: DMD
         AssignedTo: bugzilla digitalmars.com
         ReportedBy: h3r3tic mat.uni.torun.pl
 
 
 struct Foo {
         void foo() {
         }
 }
 
 typedef Foo Bar;
 
 
 void main() {
         Bar a;
         a.foo();
 }
 
 
 
 this for foo needs to be type Foo not type Bar
Same for classes: --------- import std.stdio : writefln; class Foo { int xxx; } typedef Foo Bar; void main() { auto b = new Bar; writefln("%d", b.xxx); } ----------- this for xxx needs to be type Foo not type Bar
Oct 26 2006
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomas Lindquist Olsen schrieb am 2006-10-26:
 d-bugmail puremagic.com wrote:
 http://d.puremagic.com/issues/show_bug.cgi?id=379
 Same for classes:
<snip> test case: http://dstress.kuehne.cn/run/t/typedef_19_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFZXleLK5blCcjpWoRAsgxAJoDfVRD0pjv3w8CmKJXW50BAax4oQCdFUlh sJEw6dSfrRo7sIwzjcaZlZg= =6Hgx -----END PGP SIGNATURE-----
Nov 23 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=379


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 0.175


-- 
Nov 25 2006