From 77e16a93022b35f4bf67c804e9ae96d3530f73e3 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Sun, 5 Oct 2008 17:28:15 +0200 Subject: [PATCH] Added test case for bug #100 Removed dubious check for not emitting static private global in other modules without access. This should be handled properly somewhere else, it's causing unresolved global errors for stuff that should work (in MiniD) --- gen/tollvm.cpp | 2 +- gen/toobj.cpp | 5 ----- tests/mini/tryfinally1.d | 10 ++++++++++ 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 tests/mini/tryfinally1.d diff --git a/gen/tollvm.cpp b/gen/tollvm.cpp index 45d645e4..5f4df1ca 100644 --- a/gen/tollvm.cpp +++ b/gen/tollvm.cpp @@ -184,7 +184,7 @@ const LLType* DtoType(Type* t) return llvm::OpaqueType::get(); default: - printf("trying to convert unknown type with value %d\n", t->ty); + printf("trying to convert unknown type '%s' with value %d\n", t->toChars(), t->ty); assert(0); } return 0; diff --git a/gen/toobj.cpp b/gen/toobj.cpp index d9217c9b..a9c40382 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -618,11 +618,6 @@ void VarDeclaration::toObjFile(int multiobj) { Logger::println("data segment"); - // we don't want to touch private static members at all !!! - // template instances should always be emitted - if (!DtoIsTemplateInstance(this) && prot() == PROTprivate && getModule() != gIR->dmodule) - return; - // don't duplicate work if (this->ir.resolved) return; this->ir.resolved = true; diff --git a/tests/mini/tryfinally1.d b/tests/mini/tryfinally1.d new file mode 100644 index 00000000..f1b526b1 --- /dev/null +++ b/tests/mini/tryfinally1.d @@ -0,0 +1,10 @@ +void main() +{ + try + { + } + finally + { + debug {} // the debug statement body can be anything + } +}