| Issue 98: | Std.is(comeclass, SomeInterface) always returns true, even when the instance does not implement the interface. | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
class TestStdIs
{
public function new () {}
public static function main () :Void
{
var foo = new Foo();
trace(Std.is(foo, Foo)); //true
trace(Std.is(foo, IFoo)); //true
trace(Std.is(foo, IBar)); //true .....???????
trace(Std.is(foo, String)); //false
}
}
class Foo implements IFoo
{
public function new ()
{
}
public function foo() :Void
{
}
}
interface IFoo
{
function foo() :Void;
}
interface IBar
{
function bar() :Void;
}
What is the expected output? What do you see instead?
Expected:
true
true
false
false
What I see:
true
true
true
false
What version of the product are you using? On what operating system?
haxe 2.07
hxcpp Version: 2.07.0
OS: OSX Darwin Kernel Version 10.6.0
Please provide any additional information below.
Mar 11, 2011
#1
dionjw
Mar 15, 2011
Yes, this seems to be a problem. I have have a look. Hugh
Status:
Accepted
May 4, 2011
(No comment was entered for this change.)
Status:
Fixed
May 4, 2011
I just tested this after updating to the latest version of hxcpp, and it still doesn't work. There's no __rtti field on interfaces. |