diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-16 15:15:28 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-06 13:15:27 +0200 |
commit | c024a6037f3dd7e7458d936566cd4b653b8b7545 (patch) | |
tree | aae9b2e9b332fc166a04f1b29f1ff4e62fdd6216 /compiler/src/dotty/tools/dotc/typer/Checking.scala | |
parent | 549bd812684e6f269610234ddefe8054dfb42746 (diff) | |
download | dotty-c024a6037f3dd7e7458d936566cd4b653b8b7545.tar.gz dotty-c024a6037f3dd7e7458d936566cd4b653b8b7545.tar.bz2 dotty-c024a6037f3dd7e7458d936566cd4b653b8b7545.zip |
Break out functionality from MethodType
and generalize MethodParam to ParamRef, and
TypeParamInfo to ParamInfo
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Checking.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Checking.scala b/compiler/src/dotty/tools/dotc/typer/Checking.scala index 148ccd6e3..76cbbdc6d 100644 --- a/compiler/src/dotty/tools/dotc/typer/Checking.scala +++ b/compiler/src/dotty/tools/dotc/typer/Checking.scala @@ -69,12 +69,12 @@ object Checking { // If `args` is a list of named arguments, return corresponding type parameters, // otherwise return type parameters unchanged val tparams = tycon.tpe.typeParams - def argNamed(tparam: TypeParamInfo) = args.find { + def argNamed(tparam: ParamInfo) = args.find { case NamedArg(name, _) => name == tparam.paramName case _ => false }.getOrElse(TypeTree(tparam.paramRef)) val orderedArgs = if (hasNamedArg(args)) tparams.map(argNamed) else args - val bounds = tparams.map(_.paramBoundsAsSeenFrom(tycon.tpe)) + val bounds = tparams.map(_.paramInfoAsSeenFrom(tycon.tpe).bounds) def instantiate(bound: Type, args: List[Type]) = bound.LambdaAbstract(tparams).appliedTo(args) checkBounds(orderedArgs, bounds, instantiate) |