Skip to content

Commit 8397caf

Browse files
committed
Fix JS codegen for closures calling static methods.
They had better pass the actual parameters, in addition to the captures.
1 parent 906a55f commit 8397caf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2162,7 +2162,7 @@ class JSCodeGen()(implicit ctx: Context) {
21622162

21632163
val genBody = {
21642164
val call = if (isStaticCall) {
2165-
genApplyStatic(sym, formalCaptures.map(_.ref))
2165+
genApplyStatic(sym, formalCaptures.map(_.ref) ::: actualParams)
21662166
} else {
21672167
val thisCaptureRef :: argCaptureRefs = formalCaptures.map(_.ref)
21682168
genApplyMethodMaybeStatically(thisCaptureRef, sym,

0 commit comments

Comments
 (0)