mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-06 15:34:10 +02:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
24
tests/mini/bug10.d
Normal file
24
tests/mini/bug10.d
Normal file
@@ -0,0 +1,24 @@
|
||||
module bug10;
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user