mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
New array literal support New array ~= operator support (for single element) New with statement support More...
24 lines
324 B
D
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);
|
|
}
|