back2dos/tinkerbell — Issue #1: error with AST.Build
Author: francescoagati
Created: 2012-01-17 09:44:44+00:00
State: open

```
#if macro
import haxe.macro.Expr;
import tink.macro.tools.AST;
#end

class Main {

@:macro static public function setter(e:Expr, field:String) {
return AST.build( {
var tmp = $e;
function (v) {
return $e.eval__field = v;
}
});
}

public static function main(){
var o = { foo: 5 };
var s = setter(o, 'foo');
}

}
```
with this code i have this error:

tink/macro/tools/Printer.hx:57: characters 9-18 : This constructor is not part of the enum haxe.macro.ComplexType
tink/macro/tools/Printer.hx:159: characters 10-20 : This constructor is not part of the enum haxe.macro.ExprDef
tink/macro/tools/Printer.hx:138: lines 138-236 : String should be Void
tink/macro/tools/Printer.hx:51: characters 4-8 : String should be Void

Is for haxe 2.0.8 Optional arguments in type?