aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Checking.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-13 13:46:54 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-13 13:47:44 +0200
commitf50cb2040494e622f17a1bcc323424a27129fc3a (patch)
tree34c77552d3b6f6b25797ba66494e679427dd35a2 /src/dotty/tools/dotc/typer/Checking.scala
parent1443fd4c844c1c54e59479e156833d2cce9a349a (diff)
downloaddotty-f50cb2040494e622f17a1bcc323424a27129fc3a.tar.gz
dotty-f50cb2040494e622f17a1bcc323424a27129fc3a.tar.bz2
dotty-f50cb2040494e622f17a1bcc323424a27129fc3a.zip
Make rewritings of hk applications configurable
Beta-reduce only if `Config.simplifyApplications` is true. Turning off beta-reduction revealed two problems which are also fixed in this commit: 1. Bad treatement of higher-kinded argyments in cyclicity checking 2. Wrong variance for higher-kinded arguments in TypeAccumulator
Diffstat (limited to 'src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Checking.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala
index aa13bdc3d..b37216e6e 100644
--- a/src/dotty/tools/dotc/typer/Checking.scala
+++ b/src/dotty/tools/dotc/typer/Checking.scala
@@ -204,6 +204,8 @@ object Checking {
tp.derivedRefinedType(this(parent), name, this(rinfo, nestedCycleOK, nestedCycleOK))
case tp: RecType =>
tp.rebind(this(tp.parent))
+ case tp @ HKApply(tycon, args) =>
+ tp.derivedAppliedType(this(tycon), args.map(this(_, nestedCycleOK, nestedCycleOK)))
case tp @ TypeRef(pre, name) =>
try {
// A prefix is interesting if it might contain (transitively) a reference