File tree 1 file changed +3
-1
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,9 @@ trait TypeAssigner {
255
255
*/
256
256
def accessibleSelectionType (tree : untpd.RefTree , qual1 : Tree )(implicit ctx : Context ): Type = {
257
257
var qualType = qual1.tpe.widenIfUnstable
258
- if (qualType.isLambdaSub) qualType = errorType(em " $qualType takes type parameters " , qual1.pos)
258
+ if (qualType.hasHigherKind && tree.name != nme.CONSTRUCTOR )
259
+ // constructors are selected on typeconstructor, type arguments are passed afterwards
260
+ qualType = errorType(em " $qualType takes type parameters " , qual1.pos)
259
261
else if (! qualType.isInstanceOf [TermType ]) qualType = errorType(em " $qualType is illegal as a selection prefix " , qual1.pos)
260
262
val ownType = selectionType(qualType, tree.name, tree.pos)
261
263
ensureAccessible(ownType, qual1.isInstanceOf [Super ], tree.pos)
You can’t perform that action at this time.
0 commit comments