functions now capture variables :D

This commit is contained in:
Neemek 2026-07-09 23:21:41 +02:00
parent 43e450c207
commit d315a53fbd
Signed by: neemek
GPG key ID: 84FFE4D7D40AB25E
5 changed files with 49 additions and 11 deletions

View file

@ -603,6 +603,7 @@ type FunctionValue struct {
Yield TypeSignature
Chunk *Chunk
Parent Value
Scope *Scope
}
func (v *FunctionValue) Type() ValueType {
@ -633,6 +634,7 @@ func (v *FunctionValue) Clone() Value {
v.Yield,
v.Chunk,
v.Parent,
v.Scope,
}
}