Hej !
I wanted to do this thing in a macro where resPath
is a String argument :
var cl = macro class TextsProxy extends haxe.xml.Proxy<macro $v{ resPath }, String>{
public static var __res = $v{ resPath };
}
But compiler doesn’t take $v{ resPath }
as type parameter of haxe.xml.Proxy
(it does’nt complain for the form but then can’t find the xml).
The only workaround I found is that :
var cl = macro class TextsProxy extends haxe.xml.Proxy<"foo", String>{
public static var __res = $v{ resPath };
}
switch( cl.kind ){
case TDClass(superClass, interfaces, isInterface, isFinal):
superClass.params[ 0 ] = TPExpr( macro $v{ resPath } );
case _ :
}
Is it possible to do it in the 1st way please ?