TypeChecker
- Fixed the `Function` `Container` resolution for the `ReturnStmt` to now find the nearest `parent` in its parenthood tree which is a `Function`, extract the `Function`'s name and then use that where needed
This commit is contained in:
parent
3e101ac5f8
commit
4c99b56677
|
@ -1674,7 +1674,8 @@ public final class TypeChecker
|
|||
else if(cast(ReturnStmt)statement)
|
||||
{
|
||||
ReturnStmt returnStatement = cast(ReturnStmt)statement;
|
||||
Function funcContainer = cast(Function)statement.parentOf();
|
||||
Function funcContainer = cast(Function)resolver.findContainerOfType(Function.classinfo, returnStatement);
|
||||
assert(funcContainer);
|
||||
string functionName = resolver.generateName(funcContainer.parentOf(), funcContainer);
|
||||
|
||||
/* Generated return instruction */
|
||||
|
|
Loading…
Reference in New Issue