D - [help please] dmd crashes on migration to templated version
- Manfred Nowak (18/18) Feb 26 2004 I have a class C that compiles and runs correctly.
- Walter (1/1) Feb 26 2004 I can't tell without a reproducible code example.
- Manfred Nowak (3/4) Feb 27 2004 Then there is no obvious error. I will try to track it down.
- Manfred Nowak (18/19) Mar 04 2004 I reduced the code to:
- Walter (1/1) Mar 05 2004 Thanks, I'll take it from here.
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> 