--- a/src/JavaMethod.st Tue Jul 31 09:29:20 2012 +0000
+++ b/src/JavaMethod.st Tue Jul 31 11:14:19 2012 +0000
@@ -2307,7 +2307,13 @@
"Returns true, if the receiver overwrites anotherMethod.
This method implements algorithm described in JVM spec, sec. 5.4.2.1"
- anotherMethod isJavaMethod ifFalse:[ ^ false ].
+ anotherMethod isJavaMethod ifFalse:[
+ "It is questionable what to return here. Best seems to be
+ do following: if anotherMethod belongs to one of my superclasses
+ (either JavaObject or Object in current impl), then return true,
+ false otherwise"
+ ^javaClass inheritsFrom: anotherMethod mclass.
+ ].
"An instance method m1 (self) declared in class C overrides another instance method m2
(anotherMethod) declared in class A iff all of the following are true:"