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

Exprs.eval and stored typed expressions does not work for Haxe 4.3 + #37

Open
back2dos opened this issue Jul 6, 2021 · 2 comments
Open

Comments

@back2dos
Copy link
Member

back2dos commented Jul 6, 2021

See tests.

@PaulPatat
Copy link

PaulPatat commented Nov 4, 2023

Is this why my build macro is giving 'build failure' in Haxe 4.3?

import haxe.macro.Context;
import haxe.macro.Expr;

using StringTools;

class EnumBuilder {
        macro static public function build(types:ExprOf<Map<Int, String>>):Array<Field> {
                var t:Map<Int, String> = tink.macro.Exprs.eval(types);
                var fields = Context.getBuildFields()
                for (i => name in t) {
                        fields.push({
                                name: name,
                                doc: null,
                                meta: [],
                                access: [APublic],
                                kind: FVar(null, macro $v{i}),
                                pos: Context.currentPos(),
                        });
                }
                return fields;
        }

@back2dos
Copy link
Member Author

back2dos commented Dec 8, 2023

Hard to know for sure without more context, but yes, it's a possible cause.

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