controllogic: debug value is Value (array-capable); lua get narrows to scalar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllogic
|
||||
|
||||
import (
|
||||
"math"
|
||||
"sync"
|
||||
|
||||
lua "github.com/yuin/gopher-lua"
|
||||
@@ -60,9 +61,9 @@ func (lr *luaRuntime) ensure() error {
|
||||
L.SetGlobal("get", L.NewFunction(func(s *lua.LState) int {
|
||||
target := s.CheckString(1)
|
||||
ds, name, ok := parseRef(target)
|
||||
var v float64
|
||||
if ok && lr.curResolve != nil { // shim: Task 6 finalizes lua Value handling
|
||||
if f, fok := lr.curResolve(ds, name).(float64); fok {
|
||||
v := math.NaN()
|
||||
if ok && lr.curResolve != nil {
|
||||
if f, isNum := lr.curResolve(ds, name).(float64); isNum {
|
||||
v = f
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user