Skip to content

Commit b54bc22

Browse files
oderskyDarkDimius
authored andcommitted
Set type of default getter method
Copy type from default parameter to default getter method.
1 parent 163383a commit b54bc22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ object desugar {
176176
name = meth.name.defaultGetterName(n),
177177
tparams = meth.tparams.map(tparam => dropContextBound(toDefParam(tparam))),
178178
vparamss = takeUpTo(normalizedVparamss, n),
179-
tpt = TypeTree(),
179+
tpt = vparam.tpt,
180180
rhs = vparam.rhs
181181
).withMods(Modifiers(mods.flags & AccessFlags, mods.privateWithin))
182182
val rest = defaultGetters(vparams :: vparamss1, n + 1)

0 commit comments

Comments
 (0)