HaxeFoundation / HaxeFoundation/haxe
[ide] @:structInit vs go to definition on object declaration fields
Open
feature-ide
feature-structInit
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
It sems that `@:structInit` could use some position love, see comments in `Main.main` below:
```haxe
typedef T = {
var field:Int;
}
@:structInit
class C {
public function new(field:Int) {}
}
@:structInit
class D {
var field:Int;
}
class Main {
static function main() {
var t:T = {field: 1}; // clicking on `field` takes to the field position: ideal
var c:C = {field: 1}; // clicking on `field` takes to the contstructor position: not bad, but ideally should take to the argument position (not sure if possible)
var d:D = {field: 1}; // clicking on `field` doesn't work :()
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.