HaxeFoundation / HaxeFoundation/haxe

Macro generated class names are now forced to be valid.

Open
#8,742 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

This is a bit of a space bar heating restoration request, but I'll try my luck anyway ;)

Previously, I was using something like this for generic build:

```haxe
var name = 'some.package.Fancy<${param.toString()}>';//with @:genericBuild(...) class some.package.Fancy {}
var ret = macro class $name {
}
ret.meta.push({ name: ':native', params: [validClassName()], pos: pos });
```

I realize this stretches things a bit, but it was nice in that the type name shown to the user when e.g. accessing invalid fields would map very closely to what they had written, instead of some generated thing. Is there any chance we could revert to the previous behavior?

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.