diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-18 16:38:58 +0300 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-18 16:38:58 +0300 |
commit | 1c9a49b67bee8f9b4518de870a1c41aad14a1976 (patch) | |
tree | 2c012a588257cf59f776b7b3a3c1fb91ce6e23cc | |
parent | 183311b872406e1928851a29a953c07954653297 (diff) | |
download | myslip-1c9a49b67bee8f9b4518de870a1c41aad14a1976.tar.gz myslip-1c9a49b67bee8f9b4518de870a1c41aad14a1976.zip |
fix: make argument type list stay as one type when there is just 1 argument name
-rw-r--r-- | src/type/util.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/type/util.rs b/src/type/util.rs index d95629d..04b4ee6 100644 --- a/src/type/util.rs +++ b/src/type/util.rs @@ -54,15 +54,15 @@ impl SExp { } let argtypes = match argtype { - Atom(Ty(List(v))) => Ok(v), + Atom(Ty(List(v))) if argnamevec.len() > 1 => Ok(v), Atom(Ty(t)) => Ok(vec![t]), _ => { Err(InvalidFunDef(self.clone(), InvalidArgumentList)) }, }?; - let rettype = match rettype.clone().multistep() { - Ok(Atom(Ty(t))) => Ok(t), + let rettype = match rettype.clone() { + Atom(Ty(t)) => Ok(t), _ => Err(InvalidFunDef(self.clone(), InvalidReturnType)) }?; |