Tuesday, June 6, 2023

luaeval returns number out of float

Hi, 

I use luaeval to compute some float result.
 these floating values are returned 
 to vim9 defined func which itself returns float type. 

When i run a try, vim echoes error E1012: type mismatch; expected float but got number. 


Code:
def Foo(): float
 return luaeval('require("compute.utils" ).luamethod(_A.x,_A.y)', {'x' : '2.0', 'y' : '1.0' }) 
enddef

When i print returned value of lua méthode, it prints 1.0


Huge version of gvim9 built with patch 1610 under Win10 with +lua interface. 

Thank you 
Nikola

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/771adb04-f1f1-44c2-9fbc-9cd7465626e9n%40googlegroups.com.

No comments: