Skip to content

Commit

Permalink
make generated fromHxx position the same as class position so goto-de…
Browse files Browse the repository at this point in the history
…finition takes to the class instead of macro code
  • Loading branch information
nadako committed Mar 21, 2021
1 parent e2d2eab commit 2007694
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/coconut/react/View.macro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ class View {
}
});

parametrize(added[added.length - 1], cls);
var fromHxx = added[added.length - 1];
fromHxx.pos = cls.pos;
parametrize(fromHxx, cls);

}
static function autoBuild()
Expand Down
1 change: 1 addition & 0 deletions src/coconut/react/macros/Setup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class Setup {
}
).fields;

add[0].pos = cls.pos;
parametrize(add[0], cls);

fields.concat(add);
Expand Down

0 comments on commit 2007694

Please sign in to comment.