thqby / vscode-autohotkey2-lsp

Autohotkey v2 Language Support using vscode-lsp.
https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp
GNU Lesser General Public License v3.0
210 stars 21 forks source link

[Enhancement:] 一个不必要的警告 #599

Closed PythonYunfei closed 1 day ago

PythonYunfei commented 3 weeks ago

image

thqby commented 3 weeks ago

;@lint-disable class-non-dynamic-member-check

PythonYunfei commented 3 weeks ago

主要希望开启这类检查。但是希望检查的过程中可以识别return inst,从而让后续的this获得所有inst相关的属性提示或补全。 目的不是取消这个警告。目的是增加inst的属性补全提示 到this。 希望先不关这个,什么时候有时间再去增强这个都行。这个wish完全不着急。

thqby commented 3 weeks ago

只有显式声明是支持的。

static Prototype.count := 0这也是有效的

PythonYunfei commented 3 weeks ago

image

目前没有对 this 发挥作用 但静态Call()的返回值必定和this相同。你可以做这个断言。这属于面向对象 的惯例:

类A的构造方法返回的对象X,必须满足:X is A==true

PythonYunfei commented 3 weeks ago

我是感觉只要是面向对象的语言, 肯定会符合面向对象里的common sense的.. 主要 你只是对静态Call开了个特殊, 没啥副作用..

PythonYunfei commented 3 weeks ago

只有显式声明是支持的。

static Prototype.count := 0这也是有效的

但这个 毕竟行为不一样 一个是给实例加属性,一个是给prototype加。 这样需要该代码,并破坏 原有的结构设计..

PythonYunfei commented 3 weeks ago

再次说一下,这个feature 不是一定要有,太麻烦就算了..😀