aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2015-10-20 11:19:24 +0200
committerDmitry Petrashko <dark@d-d.me>2015-10-20 11:19:24 +0200
commitcbb565a436196b102c27688d1da8f27bea12bae4 (patch)
treebd2501c2a074ed75b2a10a2b87e17b3d8f272267 /src/dotty/tools/dotc/typer/Typer.scala
parent78d769004bdcd152f9f4816bb5cf699aeeb73ff3 (diff)
parent6cca64fa0aa37942812d1c870b99f309dab67352 (diff)
downloaddotty-cbb565a436196b102c27688d1da8f27bea12bae4.tar.gz
dotty-cbb565a436196b102c27688d1da8f27bea12bae4.tar.bz2
dotty-cbb565a436196b102c27688d1da8f27bea12bae4.zip
Merge pull request #821 from dotty-staging/fix-check-simple-kinded
Check that some types are not higher-kinded.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 1bd4152e9..fbdfef930 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -370,7 +370,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
if (untpd.isWildcardStarArg(tree))
TypeTree(defn.SeqClass.typeRef.appliedTo(pt :: Nil))
else
- typedType(tree.tpt)
+ checkSimpleKinded(typedType(tree.tpt))
val expr1 =
if (isWildcard) tree.expr withType tpt1.tpe
else typed(tree.expr, tpt1.tpe)
@@ -918,7 +918,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
def typedValDef(vdef: untpd.ValDef, sym: Symbol)(implicit ctx: Context) = track("typedValDef") {
val ValDef(name, tpt, _) = vdef
completeAnnotations(vdef, sym)
- val tpt1 = typedType(tpt)
+ val tpt1 = checkSimpleKinded(typedType(tpt))
val rhs1 = vdef.rhs match {
case rhs @ Ident(nme.WILDCARD) => rhs withType tpt1.tpe
case rhs => typedExpr(rhs, tpt1.tpe)
@@ -932,7 +932,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
val tparams1 = tparams mapconserve (typed(_).asInstanceOf[TypeDef])
val vparamss1 = vparamss nestedMapconserve (typed(_).asInstanceOf[ValDef])
if (sym is Implicit) checkImplicitParamsNotSingletons(vparamss1)
- val tpt1 = typedType(tpt)
+ val tpt1 = checkSimpleKinded(typedType(tpt))
val rhs1 = typedExpr(ddef.rhs, tpt1.tpe)
assignType(cpy.DefDef(ddef)(name, tparams1, vparamss1, tpt1, rhs1), sym)
//todo: make sure dependent method types do not depend on implicits or by-name params