Skip to content

Commit c874fe3

Browse files
Fix not picking up return type with type params
1 parent a789e0e commit c874fe3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hkmc2/shared/src/main/scala/hkmc2/syntax/Tree.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ trait TypeOrTermDef:
222222
// fun f[T](n1: Int): Int
223223
// fun f[T](n1: Int)(nn: Int): Int
224224
case InfixApp(Apps(App(id: Ident, typeParams: TyTup), paramLists), Keyword.`:`, ret) =>
225-
(symbName, R(id), paramLists, S(typeParams), N)
225+
(symbName, R(id), paramLists, S(typeParams), S(ret))
226226

227227
case InfixApp(Jux(lhs, rhs), Keyword.`:`, ret) =>
228228
rec(InfixApp(rhs, Keyword.`:`, ret), S(lhs))

hkmc2/shared/src/test/mlscript/basics/ModuleMethods.mls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module N with {
3434
module N with {
3535
fun f4[T](): module T = M
3636
}
37-
//│ ╔══[ERROR] Function returning module values must have explicit return types.
37+
//│ ╔══[ERROR] Function returning module values must have concrete return types.
3838
//│ ║ l.35: fun f4[T](): module T = M
3939
//│ ╙── ^^^^^^^^^^^^^^^^^
4040

0 commit comments

Comments
 (0)