plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
d6ce6f6
— Peter John
2026-10-26T15:17:15+05:30
fix(lsp): handle block param types in local var inference
plum-lsp/src/completion.rs
CHANGED
|
@@ -173,7 +173,7 @@ fn localVarTypes(f: &ast::Fn, global: &TypeEnv, ctx: &CheckCtx) -> HashMap<Strin
|
|
|
173
173
|
let ty = match &p.ty {
|
|
174
174
|
ast::ParamType::Type(t) => plumTypeFromAst(t),
|
|
175
175
|
ast::ParamType::Variadic(t) => PlumType::TVariadic(Box::new(plumTypeFromAst(t))),
|
|
176
|
-
ast::ParamType::Fn(params, ret) => PlumType::TFun(
|
|
176
|
+
ast::ParamType::Fn(params, ret) | ast::ParamType::Block(params, ret) => PlumType::TFun(
|
|
177
177
|
params.iter().map(plumTypeFromAst).collect(),
|
|
178
178
|
Box::new(
|
|
179
179
|
ret.as_ref()
|