[Issue 197] New: mixin mixin repeated twice when error.
Derek Parnell
derek at psych.ward
Thu Jun 15 18:55:10 PDT 2006
On Fri, 16 Jun 2006 01:50:23 +0000 (UTC), d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=197
>
> Summary: mixin mixin repeated twice when error.
> Product: D
> Version: 0.160
> Platform: PC
> OS/Version: Windows
> Status: NEW
> Severity: trivial
> Priority: P2
> Component: DMD
> AssignedTo: bugzilla at digitalmars.com
> ReportedBy: huangl at tfol.net
>
> the programe :
>
> interface Interface
> {
> void Method();
> };
>
> template CInterfaceImpl(Host)
> {
> void Method()
> {
> printf("hello");
> }
> }
>
> class ClassOne : Interface
> {
> mixin CInterfaceImpl!(ClassOne, Interface);
> };
>
> int main(char[][] argv)
> {
> Interface p = new ClassOne;
> p.Method();
>
> return 0;
> }
>
> compile error normally but give a confusing error:
>
> iftest.d(17): mixin mixin CInterfaceImpl!(ClassOne,Interface);
> does not match any template declaration
>
> what's the "mixin mixin"?
Poor formatting ;-) The message should read more like ...
iftest.d(17): The mixin statement "mixin
CInterfaceImpl!(ClassOne,Interface);" does not match any template
declaration.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
16/06/2006 11:53:57 AM
More information about the Digitalmars-d-bugs
mailing list