blob: 0cffb9c8547efaebfc35f627587f30144ef6726b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id$
package scala.runtime.types;
import scala.Type;
import scala.Array;
/**
* Abstract superclass for all value types.
*
* @author Michel Schinz
* @version 1.0
*/
abstract public class ValueType extends Type {
public boolean isInstance(Object o) {
throw new UnsupportedOperationException();
}
public boolean isSubType(Type that) {
return that == Type.Any
|| that == Type.AnyVal
|| that == this;
}
public boolean isSameType(Type that) {
return this == that;
}
public Array newArray(int size) {
throw new Error("internal error (Scala runtime)");
}
}
|