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:
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 _:
}
}
}
Invoking "go to type definition" at the
|doesn't take you toFoo.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: