Passing a type as paramter to super
    Marc 
    jckj33 at gmail.com
       
    Thu Jan  4 19:16:03 UTC 2018
    
    
  
For code generation purposes, I'd like to pass a type name to 
base class. I'm not sure if it's supported, I didn't find 
anything at documentation for class constructor but it does 
compile:
> class A {
> 	static {
> 		int a, b;
> 	}
> 
> 	this(T)() {
> 
> 	}
> }
then do something like this:
> class B {
>  this() {
>    super!B;
>  }
>}
but I got the error:
> found ! when expecting ; following statement
    
    
More information about the Digitalmars-d-learn
mailing list