Skip to content

Commit bdd0289

Browse files
committed
Fix #257 ModuleDefs had invalid constructors.
1 parent 7a6fcc1 commit bdd0289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
362362
val constrSym = modcls.primaryConstructor orElse ctx.newDefaultConstructor(modcls).entered
363363
val constr = DefDef(constrSym.asTerm, EmptyTree)
364364
val clsdef = ClassDef(modcls, constr, body)
365-
val valdef = ValDef(sym, New(modcls.typeRef))
365+
val valdef = ValDef(sym, New(modcls.typeRef).select(constrSym).appliedToNone)
366366
Thicket(valdef, clsdef)
367367
}
368368

0 commit comments

Comments
 (0)