In D2, `baseClass->ctor` may be template, so `(CtorDeclaration *)baseClass->ctor` would be wrong result...

I think following code would be better:

```d
if (FuncDeclaration *f = resolveFuncCall(loc, sc, baseClass->ctor, NULL, NULL, NULL, 1))
{
    Type *tf = new TypeFunction(NULL, NULL, 0, LINKd, f->storage_class);
    ...
```

1. `resolveFuncCall` returns actually instantiated function even when `baseClass->ctor` is template.
2. `TypeFunction` constructor sets its fields by using `StorageClass stc` parameter. In this case, you can just pass `f->storage_class` to it.