Skip to content

Commit 9bddab3

Browse files
committed
rename val
1 parent 143177c commit 9bddab3

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

compiler/src/dotty/tools/dotc/util/Signatures.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ object Signatures {
149149
}
150150

151151
def toUnapplyParamss(method: Type)(using Context): List[Param] = {
152-
val resultTpe = method.finalResultType.widenDealias
153-
val paramNames = extractParamNamess(resultTpe).flatten
154-
val paramTypes = extractParamTypess(resultTpe).flatten
152+
val resultType = method.finalResultType.widenDealias
153+
val paramNames = extractParamNamess(resultType).flatten
154+
val paramTypes = extractParamTypess(resultType).flatten
155155

156156
if paramNames.length == paramTypes.length then
157157
(paramNames zip paramTypes).map((name, info) => Param(name.show, info.show))
@@ -228,7 +228,7 @@ object Signatures {
228228
err.msg match
229229
case msg: AmbiguousOverload => msg.alternatives
230230
case msg: NoMatchingOverload => msg.alternatives
231-
case _ => Nil
231+
case _ => Nil
232232

233233
// If the user writes `foo(bar, <cursor>)`, the typer will insert a synthetic
234234
// `null` parameter: `foo(bar, null)`. This may influence what's the "best"
@@ -245,8 +245,7 @@ object Signatures {
245245
alt.info.stripPoly match {
246246
case tpe: MethodType =>
247247
userParamsTypes.zip(tpe.paramInfos).takeWhile{ case (t0, t1) => t0 <:< t1 }.size
248-
case _ =>
249-
0
248+
case _ => 0
250249
}
251250
}
252251
val bestAlternative =

language-server/test/dotty/tools/languageserver/SignatureHelpTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class SignatureHelpTest {
3838
|object O:
3939
| "even" match
4040
| case s @ Even(${m1}) => println(s"s has an even number of characters")
41-
| case s => println(s"s has an odd number of characters")
41+
| case s => println(s"s has an odd number of characters")
4242
"""
43-
.signatureHelp(m1, List(), Some(0), 0)
43+
.signatureHelp(m1, Nil, Some(0), 0)
4444

4545
}
4646

0 commit comments

Comments
 (0)