Skip to content

Commit a529545

Browse files
committed
do not silently discard extra parameter lists
1 parent e92a50f commit a529545

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hkmc2/shared/src/main/scala/hkmc2/codegen/Deforestation.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,9 @@ class Deforest(using TL, Raise, Elaborator.State):
423423
defn match
424424
case FunDefn(_, sym, params, body) =>
425425
val funSymStratVar = symToStrat(sym)
426-
val param = params.head match
427-
case ParamList(flags, params, N) => params // TODO: handle mutiple param list
426+
val param = params match
427+
// TODO: handle `restParam` and mutiple param list
428+
case ParamList(flags, params, N) :: Nil => params
428429
val funStrat = constrFun(param, body)
429430
constrain(funStrat, funSymStratVar.asConsStrat)
430431
funSymStratVar

0 commit comments

Comments
 (0)