mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 23:50:43 +03:00
Resolve all base classes, including interfaces (!) before resolving the class itself.
This commit is contained in:
parent
ea2279b11a
commit
f5ce8eda1d
1 changed files with 10 additions and 2 deletions
|
@ -28,8 +28,16 @@
|
|||
void DtoResolveClass(ClassDeclaration* cd)
|
||||
{
|
||||
// make sure the base classes are processed first
|
||||
if (cd->baseClass)
|
||||
cd->baseClass->codegen(Type::sir);
|
||||
ArrayIter<BaseClass> base_iter(cd->baseclasses);
|
||||
while (base_iter.more())
|
||||
{
|
||||
BaseClass* bc = base_iter.get();
|
||||
if (bc)
|
||||
{
|
||||
bc->base->codegen(Type::sir);
|
||||
}
|
||||
base_iter.next();
|
||||
}
|
||||
|
||||
if (cd->ir.resolved) return;
|
||||
cd->ir.resolved = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue