Skip to content

Commit 52d4a14

Browse files
oderskysmarter
authored andcommitted
Fix types of lifted DefDefs.
1 parent a7ddb3b commit 52d4a14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ abstract class Lifter {
4646
if (noLift(expr)) expr
4747
else {
4848
val name = UniqueName.fresh(prefix)
49-
val liftedType = fullyDefinedType(expr.tpe.widen, "lifted expression", expr.pos)
49+
var liftedType = fullyDefinedType(expr.tpe.widen, "lifted expression", expr.pos)
50+
if (liftedFlags.is(Method)) liftedType = ExprType(liftedType)
5051
val lifted = ctx.newSymbol(ctx.owner, name, liftedFlags, liftedType, coord = positionCoord(expr.pos))
5152
defs += liftedDef(lifted, expr).withPos(expr.pos.focus)
5253
ref(lifted.termRef).withPos(expr.pos)

0 commit comments

Comments
 (0)