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
224 stars 21 forks source link

[Bug:] 实例方法的提示和补全失效 #642

Open PythonYunfei opened 1 week ago

PythonYunfei commented 1 week ago

在#633 中,将示例代码换成下面的[Code2],仍然会变回失效: [Code2:]

class CCC {
    static Call(){
        ;return {base: CCC.Prototype}
        return (Object.Call)(this)
    }
    ff3(){
        OutputDebug(789)
    }
}
x:=CCC()
x.ff3

image

PythonYunfei commented 1 week ago

Object的子类 ObS的调用方式,如:return (ObS.Call)(this),自然也不支持,变回了提示和补全失效: image

thqby commented 1 week ago
  1. 改成super()
  2. 加类型标注
PythonYunfei commented 1 week ago

不麻烦的话,还是希望能假设:(任意类型.Call)(this,args*)一定能返回 this的实例。即 返回CCC的实例。就像Super()的返回一样。

这应该也是面向对象构造方法(静态Call)的惯例。

只为插件能用起来更加顺溜..👍