File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2682,8 +2682,11 @@ object Types extends TypeUtils {
26822682 while (tparams.nonEmpty && args.nonEmpty) {
26832683 if (tparams.head.eq(tparam))
26842684 return args.head match {
2685- case _ : TypeBounds if ! widenAbstract => TypeRef (pre, tparam)
2686- case arg => arg.boxedUnlessFun(tycon)
2685+ case _ : TypeBounds if ! widenAbstract =>
2686+ if ! NamedType .validPrefix(pre) then
2687+ throw TypeError (em " invalid prefix $pre cannot replace parameter $tparam in result of selection " )
2688+ TypeRef (pre, tparam)
2689+ case arg => arg
26872690 }
26882691 tparams = tparams.tail
26892692 args = args.tail
Original file line number Diff line number Diff line change 1+ def test =
2+ Seq .empty[[T ] =>> () => ? ].head() // error
You can’t perform that action at this time.
0 commit comments