Mercurial > projects > ldc
comparison gen/classes.cpp @ 422:fa91b03d9cd7
Error message for calling a function with a missing 'this' arg.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 29 Jul 2008 10:29:52 +0200 |
parents | ac1fcc138e42 |
children | 3424f0fab7a9 |
comparison
equal
deleted
inserted
replaced
421:1c65b5477eaa | 422:fa91b03d9cd7 |
---|---|
796 // custom allocator | 796 // custom allocator |
797 else if (newexp->allocator) | 797 else if (newexp->allocator) |
798 { | 798 { |
799 DtoForceDeclareDsymbol(newexp->allocator); | 799 DtoForceDeclareDsymbol(newexp->allocator); |
800 DFuncValue dfn(newexp->allocator, newexp->allocator->ir.irFunc->func); | 800 DFuncValue dfn(newexp->allocator, newexp->allocator->ir.irFunc->func); |
801 DValue* res = DtoCallFunction(NULL, &dfn, newexp->newargs); | 801 DValue* res = DtoCallFunction(newexp->loc, NULL, &dfn, newexp->newargs); |
802 mem = DtoBitCast(res->getRVal(), DtoType(tc), ".newclass_custom"); | 802 mem = DtoBitCast(res->getRVal(), DtoType(tc), ".newclass_custom"); |
803 } | 803 } |
804 // default allocator | 804 // default allocator |
805 else | 805 else |
806 { | 806 { |
850 if (newexp->member) | 850 if (newexp->member) |
851 { | 851 { |
852 assert(newexp->arguments != NULL); | 852 assert(newexp->arguments != NULL); |
853 DtoForceDeclareDsymbol(newexp->member); | 853 DtoForceDeclareDsymbol(newexp->member); |
854 DFuncValue dfn(newexp->member, newexp->member->ir.irFunc->func, mem); | 854 DFuncValue dfn(newexp->member, newexp->member->ir.irFunc->func, mem); |
855 return DtoCallFunction(tc, &dfn, newexp->arguments); | 855 return DtoCallFunction(newexp->loc, tc, &dfn, newexp->arguments); |
856 } | 856 } |
857 | 857 |
858 // return default constructed class | 858 // return default constructed class |
859 return new DImValue(tc, mem, false); | 859 return new DImValue(tc, mem, false); |
860 } | 860 } |