HaxeFoundation / HaxeFoundation/haxe

[display] expected name for hover on enum arguments in patterns

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

Description

Hovering over a function argument at call-site reports an expected name, which allows showing this "for argument" info:

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

It would be nice if the same info was provided in patterns as well - right now the JSON only includes the expected type, but no name.

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

```haxe
class Main {
static function main() {
var f:Foo;
switch (f) {
case Bar(a):
}
}
}

enum Foo {
Bar(foo:Int);
}
```

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.