hxparse icon indicating copy to clipboard operation
hxparse copied to clipboard

New Error regards statics on generic Classes

Open 0b1kn00b opened this issue 3 years ago • 6 comments

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

Haxe build https://github.com/HaxeFoundation/haxe/commit/0c89b91432aa0687f569ec4aa035fd855ac639eb

0b1kn00b avatar Sep 24 '21 07:09 0b1kn00b

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

0b1kn00b avatar Sep 24 '21 08:09 0b1kn00b

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

0b1kn00b avatar Sep 24 '21 09:09 0b1kn00b

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

darmie avatar Feb 26 '22 08:02 darmie

try something like

#if !macro
...
#end

as a workaround

0b1kn00b avatar Feb 28 '22 21:02 0b1kn00b

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

darmie avatar Feb 28 '22 21:02 darmie

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.

0b1kn00b avatar Feb 28 '22 23:02 0b1kn00b