mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
[svn r176] Fixed a bug with class constructors.
This commit is contained in:
parent
7ae4bc6477
commit
a522719b85
5 changed files with 40 additions and 2 deletions
|
@ -793,8 +793,11 @@ DValue* DtoNewClass(TypeClass* tc, NewExp* newexp)
|
|||
}
|
||||
|
||||
// call constructor
|
||||
if (newexp->arguments)
|
||||
if (newexp->member)
|
||||
{
|
||||
assert(newexp->arguments != NULL);
|
||||
return DtoCallClassCtor(tc, newexp->member, newexp->arguments, mem);
|
||||
}
|
||||
|
||||
// return default constructed class
|
||||
return new DImValue(tc, mem, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue