Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/ast/Desugar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,6 @@ object desugar {
ValDef(param.name, param.tpt, selector(idx))
.withSpan(param.span)
.withAttachment(UntupledParam, ())
.withFlags(Synthetic)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jchyb could this cause any issue for coverage? I think we were discussing that with @kasiaMarek

Copy link
Contributor

@jchyb jchyb Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it will make any difference. We recently removed filtering out Synthetic calls for methods (they caused issues for case classes, where most used methods are synthetic), but I don't think anything like that has existed for vals (I suspect we will just get more coverage tags than necessary, but we don't necessarily need the Synthetic flag to be there to be able to fix that).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

}
Function(param :: Nil, Block(vdefs, body))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ object PcConvertToNamedLambdaParameters:
}

def isWildcardParam(param: tpd.ValDef)(using Context): Boolean =
param.name.toString.startsWith("_$") && param.symbol.is(Flags.Synthetic)
param.name.toString.startsWith("_$")

def findParamReferencePosition(param: tpd.ValDef, lambda: tpd.Tree)(using Context): Option[SourcePosition] =
var pos: Option[SourcePosition] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ import org.junit.Test

class HoverTermSuite extends BaseHoverSuite:

@Test def `n-ary lamba` =
check(
"""|object testRepor {
| val listOfTuples = List(1 -> 1, 2 -> 2, 3 -> 3)
|
| listOfTuples.map((k@@ey, value) => key + value)
|}
|""".stripMargin,
"""|val key: Int
|""".stripMargin.hover
)

@Test def `map` =
check(
"""object a {
Expand Down
Loading