Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting time back - types from non-main packages need a little love #21

Closed
glycerine opened this issue Feb 8, 2018 · 1 comment
Closed

Comments

@glycerine
Copy link
Contributor

glycerine commented Feb 8, 2018

gi> import "time"                                                                                
                                                                                                 
elapsed: '14.527µs'                                                                              
gi> time.Now()                                                                                   
                                                                                                 
elapsed: '128.408µs'                                                                             
gi> a:=time.Now()                                                                                
error from Lua vm.Call(0,0): '[string "..."]:1: attempt to index global '__type__time' (a nil value)'. supplied lua with: '     a = __gi_clone2(time.Now(), __type__time.Time);'                 
lua stack:                                                                                       
                                                                                                 
========== begin DumpLuaStack: top = 1                                                           
DumpLuaStack: i=1, t= 4                                                                          
 String :       [string "..."]:1: attempt to index global '__type__time' (a nil value)           
========= end of DumpLuaStack                                                                    
                                                                                                 
gi>     

The Luar wrapped Go value for the time.Time{} is coming back just fine, but the type system needs to be taught how to name types from non-main packages.

@glycerine
Copy link
Contributor Author

this was addressed in v1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant