aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-12 18:12:27 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-12 18:14:04 +0200
commitc7f3b45abf221c432b3fbd7462741b00a9e10142 (patch)
tree32171eb1c314e64f155fbd05d9ef01e43cac4f53 /src
parent84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb (diff)
downloaddotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.tar.gz
dotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.tar.bz2
dotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.zip
Drop restriction to 2nd order hk types
Allow hk type parameters to be higher kinded themselves.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/parsing/Parsers.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala
index 51b681c0e..c535c4241 100644
--- a/src/dotty/tools/dotc/parsing/Parsers.scala
+++ b/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -1551,7 +1551,7 @@ object Parsers {
* TypTypeParam ::= {Annotation} Id [HkTypePamClause] TypeBounds
*
* HkTypeParamClause ::= `[' HkTypeParam {`,' HkTypeParam} `]'
- * HkTypeParam ::= {Annotation} ['+' | `-'] (Id | _') TypeBounds
+ * HkTypeParam ::= {Annotation} ['+' | `-'] (Id[HkTypePamClause] | _') TypeBounds
*/
def typeParamClause(ownerKind: ParamOwner.Value): List[TypeDef] = inBrackets {
def typeParam(): TypeDef = {
@@ -1584,9 +1584,7 @@ object Parsers {
in.nextToken()
ctx.freshName(nme.USCORE_PARAM_PREFIX).toTypeName
}
- val hkparams =
- if (ownerKind == ParamOwner.TypeParam) Nil
- else typeParamClauseOpt(ParamOwner.TypeParam)
+ val hkparams = typeParamClauseOpt(ParamOwner.TypeParam)
val bounds =
if (isConcreteOwner) typeParamBounds(name)
else typeBounds()