IntelliJ-EmmyLua icon indicating copy to clipboard operation
IntelliJ-EmmyLua copied to clipboard

Does Emmy support Multiple Inheritance?

Open robspsj opened this issue 5 years ago • 7 comments

is there a way to have a class using multiple inheritances?

something like:

---@class GeometricShape
local shape = {}
function shape.getPoints() end

---@class Drawable
local drawable = {}
function drawable:render(x, y) end


---@class RectangleObject: Drawable,GeometricShape
local rectangleObject = {}

is this case I would like rectangle object to auto-complete both Drawable and GeometricShape functions

obviously, the above code does not work, but is there a way to do it? I didn't find a way to do this in the documentation, is that supported?

robspsj avatar May 03 '19 20:05 robspsj

About multiple inheritance please see this issue #11 @interface support is on the roadmap.

tangzx avatar May 09 '19 02:05 tangzx

About multiple inheritance please see this issue #11 @interface support is on the roadmap.

两年过去了,roadmap上的interface还有戏吗?[手动笑哭]

JamesHuang0331 avatar Mar 22 '22 07:03 JamesHuang0331

About multiple inheritance please see this issue #11 @interface support is on the roadmap.

两年过去了,roadmap上的interface还有戏吗?[手动笑哭]

有道理,但是为什么不是3年过去了

CppCXY avatar Mar 22 '22 08:03 CppCXY

About multiple inheritance please see this issue #11 @interface support is on the roadmap.

两年过去了,roadmap上的interface还有戏吗?[手动笑哭]

有道理,但是为什么不是3年过去了

因为现在是第4年了

WhiteRyo avatar Sep 01 '23 03:09 WhiteRyo

About multiple inheritance please see this issue #11 @interface support is on the roadmap.

两年过去了,roadmap上的interface还有戏吗?[手动笑哭]

有道理,但是为什么不是3年过去了

因为现在是第4年了

你说的很对, vscode上有个假的interface实现

CppCXY avatar Sep 01 '23 03:09 CppCXY

About multiple inheritance please see this issue #11 @interface support is on the roadmap.

两年过去了,roadmap上的interface还有戏吗?[手动笑哭]

有道理,但是为什么不是3年过去了

因为现在是第4年了

你说的很对, vscode上有个假的interface实现

跪求,我现在有一部分自动生成代码的属性需要注入到当前类型中,当前类型已经在某个继承链中,没有接口极其难受

WhiteRyo avatar Sep 01 '23 03:09 WhiteRyo

About multiple inheritance please see this issue #11 @interface support is on the roadmap.

两年过去了,roadmap上的interface还有戏吗?[手动笑哭]

有道理,但是为什么不是3年过去了

因为现在是第4年了

你说的很对, vscode上有个假的interface实现

跪求,我现在有一部分自动生成代码的属性需要注入到当前类型中,当前类型已经在某个继承链中,没有接口极其难受

vscode上的插件可能符合你的要求

CppCXY avatar Sep 01 '23 03:09 CppCXY