| 2770 | } |
| 2771 | |
| 2772 | void FinishConstructorCall(const char* pos) |
| 2773 | { |
| 2774 | // Constructor return type must be void |
| 2775 | if(CodeInfo::nodeList.back()->typeInfo != typeVoid) |
| 2776 | ThrowError(pos, "ERROR: constructor cannot be used after 'new' expression if return type is not void"); |
| 2777 | |
| 2778 | // Wrap allocation, and variable pointer copy node and constructor call node into one |
| 2779 | TypeInfo *resultType = CodeInfo::nodeList[CodeInfo::nodeList.size()-2]->typeInfo; |
| 2780 | AddTwoExpressionNode(resultType); |
| 2781 | AddTwoExpressionNode(resultType); |
| 2782 | } |
| 2783 | |
| 2784 | const char* FindConstructorName(TypeInfo* type) |
| 2785 | { |
no test coverage detected