D - [help please] dmd crashes on migration to templated version
- Manfred Nowak <svv1999 hotmail.com> Feb 26 2004
- "Walter" <walter digitalmars.com> Feb 26 2004
- Manfred Nowak <svv1999 hotmail.com> Feb 27 2004
- Manfred Nowak <svv1999 hotmail.com> Mar 04 2004
- "Walter" <walter digitalmars.com> Mar 05 2004
I have a class C that compiles and runs correctly.
Now I want to make it type dependent.
C contains a Type that is declared like:
typedef uint T;
In a first step I move this declaration out of the body of C into the
module level and put a template declaration around the declaration of C
like this:
typedef uint T;
template CTemp(T){
class C{
... //no more typedef for T in here
}
}
I instantiate the template and declare the class object like this:
alias CTemp!(T) TC;
TC.C foo= new TC.C( ... parameters for this ... );
What am I doing wrong, that make dmd crash in the semantic3 phase?
So long.
Feb 26 2004
I can't tell without a reproducible code example.
Feb 26 2004
Walter wrote:I can't tell without a reproducible code example.
Then there is no obvious error. I will try to track it down. So long.
Feb 27 2004
Walter wrote:I can't tell without a reproducible code example.
I reduced the code to: template CT(T){ class C{ const char[][] arrArr=["" ]; } } void main(){ alias CT!(int) Ct; Ct.C c= new Ct.C(); } While this crashes the untemplated version compiles okay: class C{ const char[][] arrArr=["" ]; } void main(){ C c= new C(); }
Mar 04 2004









Manfred Nowak <svv1999 hotmail.com> 