[Lua Pit] IntelliJ IDEA editor's intelligent prompt related issues

---@class 子类名 : 父类名
local 子类名 = class("子类名", 父类名)
return 子类名

Note: ---@class subclass name: The parent class name must be on the line of the local subclass name, and no blank lines are allowed. Separating blank lines will cause the parent class members to be incorrectly prompted. That is ---@class is invalid

Similar to other ---@ also pay attention to this kind of problem, ---@xxx is used to modify a variable, and it may be invalid if separated by blank lines.

For example, if you write it like this, it is invalid.

---@class 子类名 : 父类名

local 子类名 = class("子类名", 父类名)
return 子类名

 

Guess you like

Origin blog.csdn.net/qq_39574690/article/details/113631722