aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-06-29 19:59:16 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-11 13:35:02 +0200
commitd1f809f14cad2c14c312767d71361c7f2e7d8244 (patch)
treea929f8d6c9700acfc5ae031fdda6bb0852c9726e /src/dotty/tools/dotc/typer/Namer.scala
parente749d832e9adebc502c961d743b3b29072f8116a (diff)
downloaddotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.tar.gz
dotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.tar.bz2
dotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.zip
Remove old hk scheme
- Simplify RefinedType - Drop recursive definition of RefinedThis - this is now taken over by RecType. - Drop RefinedThis. - Simplify typeParams The logic avoiding forcing is no longer needed. - Remove unused code and out of date comments.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index bc8f8e281..bf36942e0 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -973,29 +973,6 @@ class Namer { typer: Typer =>
}
ensureUpToDate(sym.typeRef, dummyInfo)
ensureUpToDate(sym.typeRef.appliedTo(tparamSyms.map(_.typeRef)), TypeBounds.empty)
-
- if (Config.newHK) sym.info
- else etaExpandArgsOBS.apply(sym.info)
- }
-
- /** Eta expand all class types C appearing as arguments to a higher-kinded
- * type parameter to type lambdas, e.g. [HK0] => C[HK0]. This is necessary
- * because in `typedAppliedTypeTree` we might have missed some eta expansions
- * of arguments in F-bounds, because the recursive type was initialized with
- * TypeBounds.empty.
- */
- def etaExpandArgsOBS(implicit ctx: Context) = new TypeMap {
- def apply(tp: Type): Type = tp match {
- case tp: RefinedType =>
- val args = tp.argInfos.mapconserve(this)
- if (args.nonEmpty) {
- val tycon = tp.withoutArgs(args)
- val tycon1 = this(tycon)
- val tparams = tycon.typeParams
- val args1 = if (args.length == tparams.length) etaExpandIfHK(tparams, args) else args
- if ((tycon1 eq tycon) && (args1 eq args)) tp else tycon1.appliedTo(args1)
- } else mapOver(tp)
- case _ => mapOver(tp)
- }
+ sym.info
}
}