Skip to content
Open
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 @@ -1526,7 +1526,6 @@ object desugar {
ValDef(param.name, param.tpt, selector(idx))
.withSpan(param.span)
.withAttachment(UntupledParam, ())
.withFlags(Synthetic)
}
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