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)
This commit is contained in:
Tomas Lindquist Olsen
2008-10-05 17:28:15 +02:00
parent f721aee1a4
commit 77e16a9302
3 changed files with 11 additions and 6 deletions

View File

@@ -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;

View File

@@ -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;

10
tests/mini/tryfinally1.d Normal file
View File

@@ -0,0 +1,10 @@
void main()
{
try
{
}
finally
{
debug {} // the debug statement body can be anything
}
}