Add expression functions with context boundaries

This commit is contained in:
pavel 2026-08-27 23:05:49 +02:00
commit 773c34f3f4
18 changed files with 391 additions and 52 deletions

View file

@ -40,6 +40,9 @@ func (checker *mutabilityChecker) checkFunction(function *FunctionDecl, class *C
typ, _ := checker.semantic.ResolveTypeRefWithParams(param.TypeRef, typeParams)
_ = checker.scope.Define(&Symbol{Name: param.Name, Kind: VariableSymbol, Type: typ})
}
if function.ExpressionBody != nil {
return checker.checkExpr(function.ExpressionBody)
}
return checker.checkStmts(function.Body)
}