[haXe] Constraint Parameters - unexpected behaviour

Nicolas Cannasse ncannasse at motion-twin.com
Fri Jan 5 09:27:10 CET 2007


> class Test1<T:A,B> {
> 	public function new() {
> 	}
> }
> 
> It appears the second 'constraint parameter' in Test1 is seen as a
> second class type parameter instead. Has the intention of the syntax
> changed? 

Yes, there was an obvious syntax conflict there, so you can add
parenthesises when listing several constraints :

class Test1<T:(A,B)> {
 ...
}

Nicolas



More information about the Haxe mailing list