Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » Trouble understanding how to declare a field type.
Trouble understanding how to declare a field type. [message #1845273] Fri, 08 October 2021 19:10
Robert Zenz is currently offline Robert ZenzFriend
Messages: 1
Registered: October 2021
Junior Member
I'm trying to get autocompletion for fields working, but I have no luck so far, but maybe I'm just misunderstanding how it is supposed to work.

Assume the following file:

local A = {}

A.something = "something"
A.value = "value"

return Container


That is then used like this:

local A = require("module.sub.a")

local B = {}
B.a = provider_for_a()


I haven't managed to declare "B.a" to be of type "A" so far. From my understanding, this should do the trick:


--- @field #module.sub.a
B.a = provider_for_a()

-- Or maybe...

--- @field #A
B.a = provider_for_a()


But neither seems to be honored by autocompletion.

What am I missing?
Previous Topic:Need help getting started with Lua & luaunit or MoreUnit in Eclipse
Next Topic:Unable to install LDT to Eclipse 2019-12 (4.14.0)
Goto Forum:
  


Current Time: Fri Apr 26 04:53:31 GMT 2024

Powered by FUDForum. Page generated in 0.03224 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top