HaxeFoundation / HaxeFoundation/haxe

[display] missing @:forwardStatics completion if underlying type is abstract

Open
#9,279 0 comments 1 reaction 0 assignees View on GitHub
bug feature-ide
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

The following compiles, but `Value` does not appear in completion:

```haxe
class Main {
static function main() {
trace(Bar.Value); // compiles
Bar.
}
}

@:forwardStatics
abstract Bar(Foo) {}

abstract Foo(Int) {
public static inline final Value = 0;
}
```

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

Hover and such seems fine:

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

I'm guessing https://github.com/HaxeFoundation/haxe/commit/7353ce621f1957611160b685e55bce822470262f fixed this only in case the underlying type is a class?

Contributor guide

Open the contributing guide

Research direction

Reproduce the completion failure with the provided Main, Bar, and Foo snippet, then inspect commit 7353ce621f1957611160b685e55bce822470262f. Compare how @:forwardStatics handles class and abstract underlying types; done means Bar. completion includes the forwarded static Value.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.