Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Error regards statics on generic Classes #59

Open
0b1kn00b opened this issue Sep 24, 2021 · 6 comments
Open

New Error regards statics on generic Classes #59

0b1kn00b opened this issue Sep 24, 2021 · 6 comments

Comments

@0b1kn00b
Copy link

src/hxparse/Parser.hx:154: lines 154-161 : A generic class can't have static fields

Haxe build HaxeFoundation/haxe@0c89b91

@0b1kn00b
Copy link
Author

There's more to this, build-interp.hxml seems to work fine.

@0b1kn00b
Copy link
Author

I think this is if it is in the compilation unit in a macro context.

@darmie
Copy link

darmie commented Feb 26, 2022

I am having the same problem
hxparse/4.0.1/haxelib/src/hxparse/Parser.hx:154: lines 154-161 : A generic class can't have static fields

@0b1kn00b
Copy link
Author

0b1kn00b commented Feb 28, 2022

try something like

#if !macro
...
#end

as a workaround

@darmie
Copy link

darmie commented Feb 28, 2022

Thanks @0b1kn00b , though I do not know which part of my code I would use that.

@0b1kn00b
Copy link
Author

0b1kn00b commented Feb 28, 2022

It really depends on how you're set up. You have to get your head around the macro context build step a bit for it to make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants