-
Notifications
You must be signed in to change notification settings - Fork 17
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
unsupported method-to-closure and method-to-function #54
Comments
Thanks, @cosmos72, for making note of these. Yes they are bugs. If the values were entirely constructed at runtime from Go code (translated into Lua code), then all these would work fine. However, the time library is imported as a binary library, so really this is testing the use and interaction with binary Go values. The type system in use for Lua objects isn't as complete for dealing with binary Go values and types. This isn't intentional. It's just that the binary Go library support was added later and I haven't found time to polish it. I am certainly aware that there are rough edges, especially when asking The current status is that I've made the binary Go types work inside interpreter defined structs and standalone (https://github.com/gijit/gi/blob/master/pkg/compiler/time_test.go#L37). But there's still a bunch of polish to do. |
I can confirm that writing an almost complete Go interpreter is a lot of work... As per your suggestion, I tested the method-to-closure and method-to-function syntax on a type declared within gi:
|
yes. You can call Less(), but
|
Probably I reported this already, but I cannot find it among closed issues:
The expected result of
t.After
is a function with signaturefunc (time.Time) bool
A similar error happens with
time.Time.After
:Playground runs both as expected: https://play.golang.org/p/4DemIg_y87F
Maybe solving this can also help with issue #53 ?
The text was updated successfully, but these errors were encountered: