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 @@ -2557,17 +2557,19 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
25572557 }
25582558
25592559 def typedAppliedTypeTree (tree : untpd.AppliedTypeTree )(using Context ): Tree = {
2560+ val tpt1 = withoutMode(Mode .Pattern ):
2561+ typed(tree.tpt, AnyTypeConstructorProto )
2562+
25602563 tree.args match
25612564 case arg :: _ if arg.isTerm =>
25622565 if Feature .dependentEnabled then
2563- return errorTree(tree, em " Not yet implemented: T(...) " )
2566+ tpt1.tpe.typeSymbol.primaryConstructor.typeRef.underlying match
2567+ case mt : MethodType =>
2568+ return TypeTree (mt.instantiate(tree.args.map((typedExpr(_).tpe))))
25642569 else
25652570 return errorTree(tree, dependentMsg)
25662571 case _ =>
2567-
2568- val tpt1 = withoutMode(Mode .Pattern ) {
2569- typed(tree.tpt, AnyTypeConstructorProto )
2570- }
2572+
25712573 val tparams = tpt1.tpe.typeParams
25722574 if tpt1.tpe.isError then
25732575 val args1 = tree.args.mapconserve(typedType(_))
You can’t perform that action at this time.
0 commit comments