summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschinz <schinz@epfl.ch>2005-03-04 13:25:02 +0000
committerschinz <schinz@epfl.ch>2005-03-04 13:25:02 +0000
commitac954ccd10748463f0bbbdf9090c60a7046a73f8 (patch)
tree2f0493b50fb9cf67b1b2bd53c9381d30e52b48c4
parente6072321eae5e88ef242d689197e856fb3201291 (diff)
downloadscala-ac954ccd10748463f0bbbdf9090c60a7046a73f8.tar.gz
scala-ac954ccd10748463f0bbbdf9090c60a7046a73f8.tar.bz2
scala-ac954ccd10748463f0bbbdf9090c60a7046a73f8.zip
- removed MethodType (not needed anymore)
-rw-r--r--sources/scala/runtime/types/MethodType.java77
1 files changed, 0 insertions, 77 deletions
diff --git a/sources/scala/runtime/types/MethodType.java b/sources/scala/runtime/types/MethodType.java
deleted file mode 100644
index 60c2b6455a..0000000000
--- a/sources/scala/runtime/types/MethodType.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/* __ *\
-** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
-** /____/\___/_/ |_/____/_/ | | **
-** |/ **
-\* */
-
-// $Id$
-
-package scala.runtime.types;
-
-import scala.Type;
-import scala.Array;
-
-public class MethodType extends Type {
- public final Type[] argTypes;
- public final Type returnType;
-
- public MethodType(Type[] argTypes, Type returnType) {
- this.argTypes = argTypes;
- this.returnType = returnType;
- }
-
- public Array newArray(int size) {
- throw new Error(); // TODO provide a message (and maybe
- // use a different exception)
- }
-
- public Object defaultValue() {
- throw new Error(); // TODO provide a message (and maybe
- // use a different exception)
- }
-
- public boolean isInstance(Object o) {
- throw new Error(); // TODO provide a message (and maybe
- // use a different exception)
- }
-
- public boolean isSubType(Type that) {
- if (that instanceof MethodType) {
- MethodType thatMT = (MethodType)that;
-
- if (argTypes.length != thatMT.argTypes.length)
- return false;
-
- for (int i = 0; i < argTypes.length; ++i) {
- if (! argTypes[i].isSameType(thatMT.argTypes[i]))
- return false;
- }
- return returnType.isSubType(thatMT.returnType);
- } else
- return false;
- }
-
- public boolean isSameType(Type that) {
- if (that instanceof MethodType) {
- MethodType thatMT = (MethodType)that;
-
- if (argTypes.length != thatMT.argTypes.length)
- return false;
-
- for (int i = 0; i < argTypes.length; ++i) {
- if (! argTypes[i].isSameType(thatMT.argTypes[i]))
- return false;
- }
- return returnType.isSameType(thatMT.returnType);
- }
- else
- return false;
- }
-
- public int hashCode() {
- throw new Error(); // TODO provide a message (and maybe
- // use a different exception)
- }
-}