D-Programming-Language/dmd — pull request #1246 by AndrejMitrovic (2012-11-02 11:10:31+00:00)
Title: Fix Issue 194 - Export attributes of template fields

http://d.puremagic.com/issues/show_bug.cgi?id=194

This fixes most issues related to Issue 194. A `semantic` call is issued during ddoc generation for templates, and any errors are gagged. Normally gagging is wrong, but in this case it's harmless since it's in the ddoc stage. ddoc by default never cared about templates being semantically valid.

There is at least one problem left, it's with this code:

```d
abstract class AbsFoo(T) { }
```

Result in ddoc: `class AbsFoo(T)`

The 'abstract' is not picked up for the class even after calling semantic. But if such a class has an abstract method then its isAbstract() *will* return true:

```d
abstract class AbsFoo(T)
{
abstract void a();
}
```

Result in ddoc: `abstract class AbsFoo(T)`

A similar problem appears with `synchronized Class(T)`. I'm not sure how that can be fixed.