Type constraints question.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Type constraints question.

laurence taylor
If I have a typedef with a type constraint <T:Float> and a static function

typedef Def<T:Float> ={
 field : T
public function add<A>(v0:Def<A>,v1:Def<A>){
  return v0.field + v2.field;

I assume that the typer should recognise that v0 and v1 can be used with the '+' operator,
but that is not the case, and I am almost certain that it used to be valid.

Anybody know what is happening with it?


haXe - an open source web programming language