| Issue 162: | Reflect.compareMethods | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
class A {
public function new() {}
public function test() : String { return "A.method";}
}
class B extends A {
public function new() {
super();
}
override public function test() : String { return "B.method"; }
}
class ReflectComp {
public static function main() {
var b = new B();
var a : A = b;
trace(b.test() + " = " + a.test() + " -> " + Reflect.compareMethods(b.test, a.test));
}
}
What is the expected output? What do you see instead?
Expected : B.method = B.method -> true
Get : B.method = B.method -> false
What version of the product are you using? On what operating system?
2.08.1 (had SVN version but after updating to r449 cannot compile anything)
Please provide any additional information below.
It does work as expected on other platforms (tested on neko, js, php). Reflect.compareMethods is used by some libraries as hsl-1 for example.
Apr 4, 2012
Project Member
#1
gameh...@gmail.com
Status:
Fixed
Nov 8, 2013
Similar problem still exists with interfaces.
interface IA
{
function test():Void;
}
class B implements IA
{
public function new()
{
}
public function test():Void
{
}
}
class FunctionEquality
{
public static function main()
{
var b:B = new B();
var a:IA = b;
trace(b.test == a.test);
trace(Reflect.compareMethods(b.test, a.test));
}
}
Nov 8, 2013
Opened an issue for this here: https://github.com/HaxeFoundation/haxe/issues/2310 |