Mercurial > projects > ldc
annotate test/bug32.d @ 270:d9d5d59873d8 trunk
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
Branch statements now emit a new block after it.
Fixed the _adSort runtime function had a bad signature.
Added a missing dot prefix on compiler generated string tables for string switch.
Fixed, PTRSIZE seems like it was wrong on 64bit, now it definitely gets set properly.
author | lindquist |
---|---|
date | Mon, 16 Jun 2008 16:01:19 +0200 |
parents | 28e99b04a132 |
children |
rev | line source |
---|---|
lindquist@54 | 1 module bug32; |
lindquist@270 | 2 extern(C) int printf(char*, ...); |
lindquist@54 | 3 |
lindquist@54 | 4 struct S |
lindquist@54 | 5 { |
lindquist@54 | 6 char[] getName() { return name; } |
lindquist@54 | 7 char[] name; |
lindquist@54 | 8 } |
lindquist@54 | 9 |
lindquist@54 | 10 void main() |
lindquist@54 | 11 { |
lindquist@54 | 12 S s = S("Kyle"); |
lindquist@54 | 13 char[] name = s.name; |
lindquist@54 | 14 printf("%.*s\n", name.length, name.ptr); |
lindquist@54 | 15 } |