aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/TypeAssigner.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/TypeAssigner.scala')
-rw-r--r--src/dotty/tools/dotc/typer/TypeAssigner.scala18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala
index e26ea1138..0344ae6c6 100644
--- a/src/dotty/tools/dotc/typer/TypeAssigner.scala
+++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala
@@ -4,10 +4,9 @@ package typer
import core._
import ast._
-import config.Config.newHK
import Scopes._, Contexts._, Constants._, Types._, Symbols._, Names._, Flags._, Decorators._
import ErrorReporting._, Annotations._, Denotations._, SymDenotations._, StdNames._, TypeErasure._
-import TypeApplications.{AppliedType, TypeLambdaOLD}
+import TypeApplications.AppliedType
import util.Positions._
import config.Printers._
import ast.Trees._
@@ -99,7 +98,7 @@ trait TypeAssigner {
val base = apply(tycon)
var args = tp.baseArgInfos(base.typeSymbol)
if (base.typeParams.length != args.length)
- args = base.typeParams.map(_.memberBounds)
+ args = base.typeParams.map(_.paramBounds)
base.appliedTo(args)
case tp @ RefinedType(parent, name, rinfo) if variance > 0 =>
val parent1 = apply(tp.parent)
@@ -413,7 +412,7 @@ trait TypeAssigner {
def refineNamed(tycon: Type, arg: Tree) = arg match {
case ast.Trees.NamedArg(name, argtpt) =>
// Dotty deviation: importing ast.Trees._ and matching on NamedArg gives a cyclic ref error
- val tparam = tparams.find(_.memberName == name) match {
+ val tparam = tparams.find(_.paramName == name) match {
case Some(tparam) => tparam
case none => ntparams.find(_.name == name).getOrElse(NoSymbol)
}
@@ -430,16 +429,7 @@ trait TypeAssigner {
}
def assignType(tree: untpd.TypeLambdaTree, tparamDefs: List[TypeDef], body: Tree)(implicit ctx: Context) =
- if (newHK) tree.withType(TypeLambda.fromSymbols(tparamDefs.map(_.symbol), body.tpe))
- else {
- val tparams = tparamDefs.map(_.symbol)
- val argBindingFns = tparams.map(tparam =>
- tparam.info.bounds
- .withBindingKind(BindingKind.fromVariance(tparam.variance))
- .recursifyOLD(tparams))
- val bodyFn = body.tpe.recursifyOLD(tparams)
- tree.withType(TypeLambdaOLD(argBindingFns, bodyFn))
- }
+ tree.withType(TypeLambda.fromSymbols(tparamDefs.map(_.symbol), body.tpe))
def assignType(tree: untpd.ByNameTypeTree, result: Tree)(implicit ctx: Context) =
tree.withType(ExprType(result.tpe))