Mercurial > projects > ldc
comparison gen/classes.cpp @ 160:b77664331d06 trunk
[svn r176] Fixed a bug with class constructors.
author | lindquist |
---|---|
date | Sun, 04 May 2008 04:35:27 +0200 |
parents | 5c17f81fc1c1 |
children | a8cd9bc1021a |
comparison
equal
deleted
inserted
replaced
159:5acec6b2eef8 | 160:b77664331d06 |
---|---|
791 nest = DtoBitCast(nest, gep->getType()->getContainedType(0)); | 791 nest = DtoBitCast(nest, gep->getType()->getContainedType(0)); |
792 DtoStore(nest, gep); | 792 DtoStore(nest, gep); |
793 } | 793 } |
794 | 794 |
795 // call constructor | 795 // call constructor |
796 if (newexp->arguments) | 796 if (newexp->member) |
797 { | |
798 assert(newexp->arguments != NULL); | |
797 return DtoCallClassCtor(tc, newexp->member, newexp->arguments, mem); | 799 return DtoCallClassCtor(tc, newexp->member, newexp->arguments, mem); |
800 } | |
798 | 801 |
799 // return default constructed class | 802 // return default constructed class |
800 return new DImValue(tc, mem, false); | 803 return new DImValue(tc, mem, false); |
801 } | 804 } |
802 | 805 |