[Issue 4042] Unable to instantiate a struct template.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 9 17:56:06 PDT 2010


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


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com


--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> 2010-05-09 17:56:02 PDT ---
Thanks for the reduced test case.

This is a rather nasty problem. The essence of it is that when the
is(T.__isQObjectType) is evaluated, T is forward referenced. So it attempts to
forward instantiate T. This fails, and so the IsExpression fails.

The problem is that in the attempt to forward instantiate T, it doesn't quite
reset itself back to the state it was in before the IsExpression, and now parts
of the symbol table are in an "error" state, and a cascaded error message
(hence incomprehensible) comes out as a result.

A workaround is to remove 'abstract' from the class declaration, which enables
the forward instantiation to succeed.

-- 
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