Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 29, 2004 [Bug] DMD Crash | ||||
---|---|---|---|---|
| ||||
The following crashes dmd. Object function(int node) ObjectFactory; private ObjectFactory[char[]] factoryTable; template RegisterClassFactory(T : Object) { void RegisterClassFactory() { factoryTable[T.classinfo.name] = T.Factory; } } class Foo { public // Interface { this(char[] text) { } } static Foo Factory(int root) { } } static this() { RegisterClassFactory!(Foo)(); } |
January 30, 2004 Re: [Bug] DMD Crash | ||||
---|---|---|---|---|
| ||||
Posted in reply to Patrick Down | Actually this is easier to reproduce. This crashes dmd: Object function(int node) ObjectFactory; private ObjectFactory[char[]] factoryTable; In article <bv9tra$2p5j$1@digitaldaemon.com>, Patrick Down says... > >The following crashes dmd. > >Object function(int node) ObjectFactory; > >private ObjectFactory[char[]] factoryTable; > > >template RegisterClassFactory(T : Object) >{ >void RegisterClassFactory() >{ >factoryTable[T.classinfo.name] = T.Factory; >} >} > > >class Foo >{ >public // Interface >{ >this(char[] text) >{ >} >} > >static Foo Factory(int root) >{ >} >} > > >static this() >{ >RegisterClassFactory!(Foo)(); >} > > |
January 30, 2004 Re: [Bug] DMD Crash | ||||
---|---|---|---|---|
| ||||
Posted in reply to Patrick Down | Patrick Down wrote:
> Actually this is easier to reproduce. This crashes
> dmd:
>
> Object function(int node) ObjectFactory;
>
> private ObjectFactory[char[]] factoryTable;
alias Object function(int node) ObjectFactory;
private ObjectFactory[char[]] factoryTable;
or
Object function(int node) ObjectFactory;
private typeof(ObjectFactory)[char[]] factoryTable;
Obviously it shouldn't crash in any case, but you give no indication whether you realised you were supplying bad code.
|
January 30, 2004 Re: [Bug] DMD Crash | ||||
---|---|---|---|---|
| ||||
Posted in reply to Burton Radons | In article <bvejtl$1gui$1@digitaldaemon.com>, Burton Radons says... > >Patrick Down wrote: > >> Actually this is easier to reproduce. This crashes >> dmd: >> >> Object function(int node) ObjectFactory; >> >> private ObjectFactory[char[]] factoryTable; > > alias Object function(int node) ObjectFactory; > private ObjectFactory[char[]] factoryTable; > >or > > Object function(int node) ObjectFactory; > private typeof(ObjectFactory)[char[]] factoryTable; > >Obviously it shouldn't crash in any case, but you give no indication whether you realised you were supplying bad code. Thanks. I had already figured it out but it's good of you to point out my error. |
Copyright © 1999-2021 by the D Language Foundation