Issue 74: type parameter contraint + inline
Status:  Fixed
Owner: ----
Closed:  Jan 2011
Reported by michaelbaczynski@gmail.com, Oct 21, 2010
using latest haXe/hxcpp from svn, the following source does not compile:

---------file Main.hx:

class Main
{
  public static function main():Void
  {
    var foo = new Foo<FooItem>();
    foo.foo(); //error C2039: 'compare' : is not a member of 'hx::Object'
  }
}

class FooItem implements Comparable<FooItem>
{
  public var i:Int;
  public function new() {}
  
  public function compare(other:FooItem):Int
  {
    return other.i - i;
  }
}

---------file Comparable.hx:

interface Comparable<T>
{
  function compare(other:T):Int;
}

---------file Foo.hx:

class Foo<T:Comparable<T>>
{
  var _a:Array<T>;

  public function new() {}
  
  inline public function foo():Void //compiles when inline keyword is removed
  {
    var result = _a[0].compare(_a[1]);
  }
}

Jan 17, 2011
Project Member #1 gameh...@gmail.com
Fixed on SVN
Status: Fixed
Jan 20, 2011
Project Member #2 gameh...@gmail.com
Sorry, This one is still broken
Status: Accepted
Jan 22, 2011
Project Member #3 gameh...@gmail.com
Hopefully this is fixed again.
Status: Fixed
Jan 22, 2011
#4 michaelbaczynski@gmail.com
thanks, I can confirm that it works now :)