diff --git a/gen/toir.cpp b/gen/toir.cpp index b397452f..6d7a0002 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -1199,6 +1199,7 @@ DValue* CallExp::toElem(IRState* p) DValue* CastExp::toElem(IRState* p) { + assert(type); Logger::print("CastExp::toElem: %s | %s\n", toChars(), type->toChars()); LOG_SCOPE; @@ -2254,7 +2255,10 @@ DValue* DelegateExp::toElem(IRState* p) 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); diff --git a/llvmdc.kdevelop.filelist b/llvmdc.kdevelop.filelist index 002f5b54..c3d47318 100644 --- a/llvmdc.kdevelop.filelist +++ b/llvmdc.kdevelop.filelist @@ -765,6 +765,7 @@ tangotests/p.d tangotests/q.d tangotests/r.d tangotests/s.d +tangotests/stdout1.d tangotests/t.d test test/a.d diff --git a/tangotests/stdout1.d b/tangotests/stdout1.d new file mode 100644 index 00000000..aff18520 --- /dev/null +++ b/tangotests/stdout1.d @@ -0,0 +1,6 @@ +import tango.io.Stdout; + +void main() +{ + Stdout("Hello World").newline; +}