HaxeFoundation / HaxeFoundation/haxe

[display] completion on type name is missing .new

Open
#7,273 0 comments 0 reactions 1 assignee Claimed by @Simn View on GitHub
feature-ide
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

Similar to classes, `new` should appear in completion here, but only a regular static function like `foo()` does:

![](https://i.imgur.com/BbVTrqZ.png)

Which actually, now that I mention it, seems to be broken for classes too?

![](https://i.imgur.com/O3EiSlu.png)

The class case used to work in 3.4.7, so that part is a regression, but it never worked for abstracts it seems.
____

```haxe
package cases;

class Issue7273 extends DisplayTestCase {
/**
class Main {
static function main() {
Main.{-1-}
Foo.{-2-}
}

public function new() {}
}

abstract Foo(Int) from Int {
public function new() this = 0;
}
**/
function test() {
eq(true, hasField(fields(pos(1)), "new", "Void -> Main", "method"));
eq(true, hasField(fields(pos(2)), "new", "Void -> Foo", "method"));
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.