- give PFunction a bit more information:
* explicitly require passing the owning class when creating it. * extract self pointer class when adding a variant. * put the flags on the single variants, we can not fully rule out that they will be 100% identical, if variants ever get allowed.
This commit is contained in:
parent
091da92819
commit
db8ab1bc4a
10 changed files with 196 additions and 33 deletions
|
|
@ -686,7 +686,7 @@ void FFunctionBuildList::Build()
|
|||
|
||||
// This needs to be fixed, so that the compile context receives the entire function symbol, including the containing class, the prototype and argument names, which will be needed to run the code generator
|
||||
// As a first step this just needs to get working so fetch the class type from the prototype's argument list.
|
||||
auto cls = static_cast<PClass*>(item.Func->Variants[0].Proto->ArgumentTypes[!!(item.Func->Flags & VARF_Action)]);
|
||||
auto cls = static_cast<PClass*>(item.Func->Variants[0].Proto->ArgumentTypes[!!(item.Func->Variants[0].Flags & VARF_Action)]);
|
||||
// We don't know the return type in advance for anonymous functions.
|
||||
FCompileContext ctx(cls, nullptr);
|
||||
item.Code = item.Code->Resolve(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue