Add expression functions with context boundaries
This commit is contained in:
parent
5085ae51aa
commit
773c34f3f4
18 changed files with 391 additions and 52 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue