Files
ldc/test/bug10.d
Tomas Lindquist Olsen 10db08076c [svn r44] Lots of bug fixes.
New array literal support
New array ~= operator support (for single element)
New with statement support
More...
2007-10-19 07:43:21 +02:00

24 lines
324 B
D

module bug10;
import std.stdio;
class C
{
char[] msg;
this()
{
}
this(char[] msg)
{
this.msg = msg;
}
}
void main()
{
auto c = new C();
c.msg = "world";
auto b = new C("hello");
printf("%.*s\n", b.msg.length, b.msg.ptr);
printf("%.*s\n", c.msg.length, c.msg.ptr);
}