From de98513298abe9f65eea475460f3aaba758f4dfa Mon Sep 17 00:00:00 2001 From: schinz Date: Wed, 14 May 2003 12:58:30 +0000 Subject: - added a constructor, fixed another one - added lookup methods --- sources/scalac/symtab/SymbolSubstTypeMap.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sources/scalac') diff --git a/sources/scalac/symtab/SymbolSubstTypeMap.java b/sources/scalac/symtab/SymbolSubstTypeMap.java index 0ecbacc1d9..5ba22ce7ae 100644 --- a/sources/scalac/symtab/SymbolSubstTypeMap.java +++ b/sources/scalac/symtab/SymbolSubstTypeMap.java @@ -38,7 +38,13 @@ public class SymbolSubstTypeMap extends Type.Map { public SymbolSubstTypeMap(Map symbols, Map types) { this(); insertSymbol(symbols); - insertType(symbols); + insertType(types); + } + + public SymbolSubstTypeMap(SymbolSubstTypeMap other) { + this(); + insertSymbol(other.symbols); + insertType(other.types); } //######################################################################## @@ -71,6 +77,10 @@ public class SymbolSubstTypeMap extends Type.Map { symbols.keySet().removeAll(keys); } + public Symbol lookupSymbol(Symbol key) { + return (Symbol)symbols.get(key); + } + //######################################################################## // Public Methods - Inserting and removing symbol to type substitutions @@ -101,6 +111,10 @@ public class SymbolSubstTypeMap extends Type.Map { types.keySet().removeAll(keys); } + public Type lookupType(Symbol key) { + return (Type)types.get(key); + } + //######################################################################## // Public Methods - Applying the substitutions -- cgit v1.2.3