mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 01:23:14 +01:00
[svn r44] Lots of bug fixes.
New array literal support New array ~= operator support (for single element) New with statement support More...
This commit is contained in:
23
test/bug10.d
Normal file
23
test/bug10.d
Normal file
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user