[Issue 4042] Unable to instantiate a struct template.
wrzosk
dprogr at gmail.com
Sat Apr 3 05:34:29 PDT 2010
The test case compiles when exec method definition is moved down:
template isQObjectType(T)
{
enum isQObjectType = is(T.__isQObjectType);
}
template QTypeInfo(T)
{
static if (!isQObjectType!T)
{
enum size = T.sizeof;
}
}
struct QList(T)
{
alias QTypeInfo!T TI;
int x;
void foo()
{
x++;
}
}
interface IQGraphicsItem
{
}
void exec(QList!(QAction) actions) {}
abstract class QGraphicsObject : IQGraphicsItem
{
}
class QGraphicsWidget : QGraphicsObject
{
}
class QAction
{
final void associatedGraphicsWidgets(QList!(QGraphicsWidget) a)
{
QList!(QGraphicsWidget) x;
}
}
void main()
{
}
More information about the Digitalmars-d-bugs
mailing list