changeset 150:2c336566ffed trunk

[svn r156] added a testcase for the most annoying bug ever
author lindquist
date Mon, 24 Mar 2008 20:05:44 +0100
parents 4c577c2b7229
children d11848349f97
files gen/toir.cpp llvmdc.kdevelop.filelist tangotests/stdout1.d
diffstat 3 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/toir.cpp	Mon Mar 24 19:43:02 2008 +0100
+++ b/gen/toir.cpp	Mon Mar 24 20:05:44 2008 +0100
@@ -1199,6 +1199,7 @@
 
 DValue* CastExp::toElem(IRState* p)
 {
+    assert(type);
     Logger::print("CastExp::toElem: %s | %s\n", toChars(), type->toChars());
     LOG_SCOPE;
 
@@ -2254,7 +2255,10 @@
     else if (func->toParent()->isInterfaceDeclaration())
         assert(0 && "TODO delegate to interface method");
     else
+    {
+        DtoForceDeclareDsymbol(func);
         castfptr = func->irFunc->func;
+    }
 
     castfptr = DtoBitCast(castfptr, fptr->getType()->getContainedType(0));
     DtoStore(castfptr, fptr);
--- a/llvmdc.kdevelop.filelist	Mon Mar 24 19:43:02 2008 +0100
+++ b/llvmdc.kdevelop.filelist	Mon Mar 24 20:05:44 2008 +0100
@@ -765,6 +765,7 @@
 tangotests/q.d
 tangotests/r.d
 tangotests/s.d
+tangotests/stdout1.d
 tangotests/t.d
 test
 test/a.d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tangotests/stdout1.d	Mon Mar 24 20:05:44 2008 +0100
@@ -0,0 +1,6 @@
+import tango.io.Stdout;
+
+void main()
+{
+    Stdout("Hello World").newline;
+}