Thread overview | ||||||
---|---|---|---|---|---|---|
|
September 13, 2007 [Issue 1498] New: Recursive mixins are not allowed | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1498 Summary: Recursive mixins are not allowed Product: D Version: 1.021 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: samukha@voliacable.com I and other people have asked in the NG about recursive mixins and got no answer. Recursive mixins are probably tricky to implement but until they are implemented or the specs clearly prohibit them, it is a bug (and major one with respect to what I'm trying to do). template Foos(Funcs...) { static if (Funcs.length) { mixin Foos!(Funcs[1..$]); } } mixin Foos!(void function(), void function(int)); Error: mixin hello.Foos!(void(*)(),void(*)(int)).Foos!(void(*)(int)).Foos!() recursive mixin instantiation -- |
September 13, 2007 Re: [Issue 1498] New: Recursive mixins are not allowed | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | Reply to d-bugmail@puremagic.com,
> http://d.puremagic.com/issues/show_bug.cgi?id=1498
>
> Summary: Recursive mixins are not allowed
> Product: D
> Version: 1.021
> Platform: PC
> OS/Version: Windows
> Status: NEW
> Severity: normal
> Priority: P2
> Component: DMD
> AssignedTo: bugzilla@digitalmars.com
> ReportedBy: samukha@voliacable.com
> I and other people have asked in the NG about recursive mixins and got
> no answer. Recursive mixins are probably tricky to implement but until
> they are implemented or the specs clearly prohibit them, it is a bug
> (and major one with respect to what I'm trying to do).
>
> template Foos(Funcs...)
> {
> static if (Funcs.length)
> {
> mixin Foos!(Funcs[1..$]);
> }
> }
> mixin Foos!(void function(), void function(int));
>
> Error: mixin
> hello.Foos!(void(*)(),void(*)(int)).Foos!(void(*)(int)).Foos!()
> recursive mixin instantiation
>
static foreach should cover this
|
September 13, 2007 [Issue 1498] Recursive mixins are not allowed | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1498 ------- Comment #2 from samukha@voliacable.com 2007-09-13 12:36 ------- True, but it's going to be D 2.0 feature and remain a bug/undefined behavior in D 1.0 (which I am confined to because of Tango/DFL). -- |
June 27, 2009 [Issue 1498] Recursive mixins are not allowed | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1498 Christian Kamm <kamm-removethis@incasoftware.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |kamm-removethis@incasoftwar | |e.de Resolution| |FIXED --- Comment #3 from Christian Kamm <kamm-removethis@incasoftware.de> 2009-06-27 10:08:51 PDT --- The test case passes for me with DMD 1.045 and seems to behave correctly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation