My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 162: Reflect.compareMethods
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Apr 2012


 
Reported by musa...@gmail.com, Mar 22, 2012
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
Fixed on SVN, thanks for reporting.
Status: Fixed
Nov 8, 2013
#2 Richard....@gmail.com
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));
        }
}



Powered by Google Project Hosting