From ee9191bbf03daecc6f77942c78a363e36ce6afb9 Mon Sep 17 00:00:00 2001 From: paltherr Date: Fri, 21 Feb 2003 10:28:49 +0000 Subject: - Added class MapOnlyTypes - Changed erasureMap to extend MapOnlyTypes instead of Map --- sources/scalac/symtab/Type.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sources/scalac/symtab/Type.java b/sources/scalac/symtab/Type.java index a16250004e..7e94662d9a 100644 --- a/sources/scalac/symtab/Type.java +++ b/sources/scalac/symtab/Type.java @@ -669,6 +669,12 @@ public class Type implements Modifiers, Kinds, TypeTags { } } + public abstract static class MapOnlyTypes extends Map { + public Symbol map(Symbol sym) { return sym; } + public Symbol[] map(Symbol[] syms) { return syms; } + public Scope map(Scope s) { return s; } + } + // baseType and asSeenFrom -------------------------------------------------------- /** Return the base type of this type whose symbol is `clazz', or NoType, if @@ -1845,7 +1851,7 @@ public class Type implements Modifiers, Kinds, TypeTags { // Erasure -------------------------------------------------------------------------- - public static Map erasureMap = new Map() { + public static Map erasureMap = new MapOnlyTypes() { public Type apply(Type t) { return t.erasure(); } }; -- cgit v1.2.3