Interface dispatch bug
Interface methods should bind to the lowest sub-interface. Only search
declared methods in a class before trying to find the interface method
via the iftables.
Unit test that declares toString in an concrete class, where toString
has been made an interface method in CharSequence. ecj compiles this
method call into an invokeinterface (hence the custom build).
Change-Id: Iefa394c9e7a22da9c6ea58f07a77880102c2f966
diff --git a/test/022-interface/src/ObjectOverridingInterface.java b/test/022-interface/src/ObjectOverridingInterface.java
new file mode 100644
index 0000000..a44cdf5
--- /dev/null
+++ b/test/022-interface/src/ObjectOverridingInterface.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Interface methods that override those of Object, the parent of all interfaces
+ */
+public interface ObjectOverridingInterface extends CharSequence {
+ public boolean equals(Object o);
+ public int hashCode();
+}