[Issue 4042] Unable to instantiate a struct template.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 3 05:01:56 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4042
Max Samukha <samukha at voliacable.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |samukha at voliacable.com
--- Comment #1 from Max Samukha <samukha at voliacable.com> 2010-04-03 05:01:52 PDT ---
A corrected and smaller test-case:
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++;
}
}
void exec(QList!(QAction) actions) {}
interface IQGraphicsItem
{
}
abstract class QGraphicsObject : IQGraphicsItem
{
}
class QGraphicsWidget : QGraphicsObject
{
}
class QAction
{
final void associatedGraphicsWidgets(QList!(QGraphicsWidget) a)
{
QList!(QGraphicsWidget) x;
}
}
void main()
{
}
----
There may be more than one bug. Note that the static if body in QTypeInfo is
evaluated even though no __isQObjectType is defined in QGraphicsWidget or
QAction.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list