File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,14 @@ object Checking {
110110 * A test case is neg/i2771.scala.
111111 */
112112 def checkKindRank (arg : Tree , paramBounds : TypeBounds )(implicit ctx : Context ): Tree = {
113+ def result (tp : Type ): Type = tp match {
114+ case tp : HKTypeLambda => tp.resultType
115+ case tp : TypeProxy => result(tp.superType)
116+ case _ => defn.AnyType
117+ }
113118 def kindOK (argType : Type , boundType : Type ): Boolean =
114119 ! argType.isHK ||
115- boundType.isHK && kindOK(argType.resultType, boundType.resultType )
120+ boundType.isHK && kindOK(result( argType), result( boundType) )
116121 if (kindOK(arg.tpe, paramBounds.hi)) arg
117122 else errorTree(arg, em " ${arg.tpe} takes type parameters " )
118123 }
You can’t perform that action at this time.
0 commit comments