Skip to content

Commit edd6cf8

Browse files
committed
Set type of default getter method
Copy type from default parameter to default getter method.
1 parent 00638e9 commit edd6cf8

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
@@ -184,7 +184,7 @@ object desugar {
184184
name = meth.name.defaultGetterName(n),
185185
tparams = meth.tparams.map(tparam => dropContextBound(toDefParam(tparam))),
186186
vparamss = takeUpTo(normalizedVparamss, n),
187-
tpt = TypeTree(),
187+
tpt = vparam.tpt,
188188
rhs = vparam.rhs
189189
).withMods(Modifiers(mods.flags & AccessFlags, mods.privateWithin))
190190
val rest = defaultGetters(vparams :: vparamss1, n + 1)

0 commit comments

Comments
 (0)