-
example: local F = @function(): S
local S = @record{ f: F } got error: |
Beta Was this translation helpful? Give feedback.
Answered by
edubart
Aug 27, 2021
Replies: 1 comment 1 reply
-
You can only do this using local S <forwarddecl> = @record{} -- declare S with incomplete fields
local F = @function(): S -- use S
S = @record{ f: F } -- define S fields Another option is to use local S = @record{ f: function(): S } |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
edubart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can only do this using
<forwarddecl>
annotation, here is an example:Another option is to use
S
inside its definition: