Open scarf005 opened 2 weeks ago
Scala code runner version: 1.4.3 Scala version (default): 3.5.2
package `2015`.day24
def quantumEntanglement(xs: Iterable[Long]): Long = xs.product
@main def main() = val input = Vector(1L, 2L) val groupWeight = input.sum / 3
val answer = (1 to input.size).iterator .map { n => val combs = input.combinations(n).filter(_.sum == groupWeight).toVector combs }
println(answer)
2. attempt to inline `combs`. ### Expected behavior ```diff .map { n => - val combs = input.combinations(n).filter(_.sum == groupWeight).toVector - combs + input.combinations(n).filter(_.sum == groupWeight).toVector }
code inlining is done without issue.
however, inlining fails with:
Following variables are shadowed: scala.Long.==.
Linux
VS Code
v1.42.0
reports.zip
Thanks for reporting! I will try and take a look later next week
Describe the bug
Scala code runner version: 1.4.3 Scala version (default): 3.5.2
def quantumEntanglement(xs: Iterable[Long]): Long = xs.product
@main def main() = val input = Vector(1L, 2L) val groupWeight = input.sum / 3
val answer = (1 to input.size).iterator .map { n => val combs = input.combinations(n).filter(_.sum == groupWeight).toVector combs }
println(answer)
code inlining is done without issue.
Actual behavior
however, inlining fails with:
Following variables are shadowed: scala.Long.==.
Operating system
Linux
Editor/Extension
VS Code
Version of Metals
v1.42.0
Extra context or search terms
reports.zip