aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-07-03 19:02:26 +0200
committerMartin Odersky <odersky@gmail.com>2014-07-17 11:02:00 +0200
commitdb88bf06958e33ae415ca227808ab1f3e48fed7f (patch)
treedef81047ef7f2bdf930e2a5561cfcd2403a61912 /src/dotty/tools/dotc/core/Symbols.scala
parentefe4f7e43652a303d16a5253f84316e547f45cca (diff)
downloaddotty-db88bf06958e33ae415ca227808ab1f3e48fed7f.tar.gz
dotty-db88bf06958e33ae415ca227808ab1f3e48fed7f.tar.bz2
dotty-db88bf06958e33ae415ca227808ab1f3e48fed7f.zip
Various cleanups and utility additions
- Some new functionality in tpd and in Symbols. - Added `sm` interpolator to print nicely. - Make use of nestedMap where possible. - Add IdentityDenotTransformer as a convencience class
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index cfd5bdf23..6421018e5 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -261,16 +261,14 @@ trait Symbols { this: Context =>
newSymbol(owner, name, SyntheticArtifact,
if (name.isTypeName) TypeAlias(ErrorType) else ErrorType)
- type OwnerMap = Symbol => Symbol
-
/** Map given symbols, subjecting all types to given type map and owner map.
* Cross symbol references are brought over from originals to copies.
* Do not copy any symbols if all attributes of all symbols stay the same.
*/
def mapSymbols(
originals: List[Symbol],
- typeMap: TypeMap = IdentityTypeMap,
- ownerMap: OwnerMap = identity)
+ typeMap: Type => Type = IdentityTypeMap,
+ ownerMap: Symbol => Symbol = identity)
=
if (originals forall (sym =>
(typeMap(sym.info) eq sym.info) && (ownerMap(sym.owner) eq sym.owner)))