-
Notifications
You must be signed in to change notification settings - Fork 25
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
haxe.macro.Compiler.setFieldType #57
Comments
Hej, I'm sorry, there is nothing to do with type patching. var ttype = t, p;
while( true )
switch(ttype) {
case TPath(t):
if( t.params.length == 1 && (t.name == "Null" || t.name == "SNull") ) {
ttype = switch( t.params[0] ) {
case TPType(t): t;
default: throw "assert";
};
continue;
}
p = t.pack.copy();
p.push(t.name);
if( t.sub != null ) p.push(t.sub);
break;
default:
Context.error("Relation type should be a type path", f.pos);
}
function e(expr) return { expr : expr, pos : pos };
var get = {
args : [],
params : [],
ret : t,
expr: macro return @:privateAccess $p{p}.manager.__get(this, $v{f.name}, $v{relKey}, $v{lock}),
};
var set = {
args : [{ name : "_v", opt : false, type : t, value : null }],
params : [],
ret : t,
expr: macro return @:privateAccess $p{p}.manager.__set(this, $v{f.name}, $v{relKey}, _v),
}; |
Got the same exact problem as you. |
Hej Emugel ! |
Thank you sir! I had one error with
Do you see why? Edit: even though it compiles and seems to work I am not sure at all it is correct, it would be better we inform of a likely regression here. |
Hmmm I don't know why it throws you this error. I'm on Haxe 4, are you too ? |
Right now Haxe 4.2.1. I mean, according to the doc, |
I had actually misread your patch, |
Can you please open a PR with your fix and a small test case? (EDIT: please @ me directly on the PR so I can review/approve it, I'm not longer watching/officially maintaining this repository). |
Hej Jonas ! Thanks for your reply even if you don't maintain this anymore ! That's pitty that noone want to maintain this lib anymore, I still use it in my projects and find it really light and useful. Thanks anyway for your interest. |
Let me know if I can help you get started. And maybe in the future you can help maintain it too : ) |
Jonas, I'll be on holiday soon, I'll contact you by PM and yes if you could help me get started and maybe talk a little about how I can help in maintaining this lib, I will be thanksful. See you soon ;) |
Hej !
Happy Christmas everyone !
I'm sorry, I always come with strange things...
Last changes in RecordMacros.hx related to :
record-macros/src/sys/db/RecordMacros.hx
Line 1380 in aaa5f70
Makes Haxe complain when trying to build my code.
I've done a small example, let's say we have that :
Main.hx
Foo.hx
Bar.hx
my/Bar.hx
build.hxml
If this line is commented, all runs well, but when it's set, I get this error :
record-macros/git/src/sys/db/RecordMacros.hx:1391: characters 46-53 : Unknown identifier : my.Bar
Is there something we could do to make it work again like before please ? (Before,
untyped
was used but now, with the strict synthax, the compiler complains...)Thanks for reading,
Cheers,
Michal
The text was updated successfully, but these errors were encountered: