File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2515,17 +2515,19 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
25152515 }
25162516
25172517 def typedAppliedTypeTree (tree : untpd.AppliedTypeTree )(using Context ): Tree = {
2518+ val tpt1 = withoutMode(Mode .Pattern ):
2519+ typed(tree.tpt, AnyTypeConstructorProto )
2520+
25182521 tree.args match
25192522 case arg :: _ if arg.isTerm =>
25202523 if Feature .dependentEnabled then
2521- return errorTree(tree, em " Not yet implemented: T(...) " )
2524+ tpt1.tpe.typeSymbol.primaryConstructor.typeRef.underlying match
2525+ case mt : MethodType =>
2526+ return TypeTree (mt.instantiate(tree.args.map((typedExpr(_).tpe))))
25222527 else
25232528 return errorTree(tree, dependentMsg)
25242529 case _ =>
2525-
2526- val tpt1 = withoutMode(Mode .Pattern ) {
2527- typed(tree.tpt, AnyTypeConstructorProto )
2528- }
2530+
25292531 val tparams = tpt1.tpe.typeParams
25302532 if tpt1.tpe.isError then
25312533 val args1 = tree.args.mapconserve(typedType(_))
You can’t perform that action at this time.
0 commit comments