Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
February 26, 2004 [help please] dmd crashes on migration to templated version | ||||
---|---|---|---|---|
| ||||
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. |
February 26, 2004 Re: [help please] dmd crashes on migration to templated version | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | I can't tell without a reproducible code example. |
February 27, 2004 Re: [help please] dmd crashes on migration to templated version | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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.
|
March 04, 2004 Re: [help please] dmd crashes on migration to templated version | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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();
}
|
March 06, 2004 Re: [help please] dmd crashes on migration to templated version | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | Thanks, I'll take it from here. |
Copyright © 1999-2021 by the D Language Foundation