| Issue 70: | interface A implements interface B: cast fails | |
| 1 person starred this issue and may be notified of changes. | Back to list |
compile the source below using haXe/hxcpp from svn:
class Main
{
static var _app:Main;
public static function main():Void
{
_app = new Main();
}
public function new()
{
var a = new Foo<Int>();
var b:Foo<Int> = cast a.foo();
trace(b != null); //should be true
}
}
interface A<T> {}
interface B<T> implements A<T> {}
class Foo<T> implements B<T>
{
public function new() {}
public function foo():A<T>
{
return new Foo<T>();
}
}
works if Foo declared like this:
class Foo<T> implements B<T>, implements A<T>
Jan 17, 2011
Project Member
#1
gameh...@gmail.com
Status:
Fixed
Jan 20, 2011
(No comment was entered for this change.)
Status:
Started
Jan 20, 2011
Ok, this should be working now.
Status:
Fixed
Jan 21, 2011
thanks, I confirm it works now. however something else is broken: https://code.google.com/p/hxcpp/issues/detail?id=94 (maybe related to this issue) |