diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scalac/symtab/SymbolSubstTypeMap.java | 16 |
1 files changed, 15 insertions, 1 deletions
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 |