HaxeFoundation / HaxeFoundation/haxe
[display] display/typeDefinition doesn't work in object literal
Open
enhancement
feature-ide
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
class Main {
static function main() {
var foo:Foo = { | bar: 0};
}
}
typedef Foo = {bar:Int};
```
Invoking "go to type definition" at the `|` doesn't take you to `Foo`.
This may look a bit silly in the above example, but this can be especially useful in cases where there isn't a type hint nearby to use the regular "go to definition" on:
```haxe
class Main {
static function main() {
var e:haxe.macro.Expr.ExprDef = null;
switch (e) {
case EObjectDecl(fields):
fields.push({ |
field: "foo",
expr: macro "bar"
})
case _:
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.