Skip to content

Commit 72e3b31

Browse files
Fix not picking up return type with type params
1 parent e4508ae commit 72e3b31

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
@@ -232,7 +232,7 @@ trait TypeOrTermDef:
232232
// fun f[T](n1: Int): Int
233233
// fun f[T](n1: Int)(nn: Int): Int
234234
case InfixApp(Apps(App(id: Ident, typeParams: TyTup), paramLists), Keyword.`:`, ret) =>
235-
(symbName, R(id), paramLists, S(typeParams), N)
235+
(symbName, R(id), paramLists, S(typeParams), S(ret))
236236

237237
case InfixApp(Jux(lhs, rhs), Keyword.`:`, ret) =>
238238
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)