File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -538,7 +538,8 @@ var LuaTranspiler = /** @class */ (function () {
538538 return this . transpileArrayCallExpression ( node ) ;
539539 }
540540 // Include context parameter if present
541- var callPath_1 = this . transpileExpression ( node . expression ) ;
541+ var expType = this . checker . getTypeAtLocation ( node . expression . expression ) ;
542+ var callPath_1 = ( expType && expType . symbol ) ? expType . symbol . name + "." + node . expression . name . escapedText : this . transpileExpression ( node . expression ) ;
542543 var params_1 = this . transpileArguments ( node . arguments , node . expression . expression ) ;
543544 return callPath_1 + "(" + params_1 + ")" ;
544545 }
Original file line number Diff line number Diff line change @@ -589,8 +589,10 @@ export class LuaTranspiler {
589589 }
590590
591591 // Include context parameter if present
592- let callPath = this . transpileExpression ( node . expression ) ;
593- const params = this . transpileArguments ( node . arguments , node . expression . expression ) ;
592+ const expType = this . checker . getTypeAtLocation ( node . expression . expression ) ;
593+ let callPath = ( expType && expType . symbol ) ? `${ expType . symbol . name } .${ node . expression . name . escapedText } ` : this . transpileExpression ( node . expression ) ;
594+ let params = this . transpileArguments ( node . arguments , node . expression . expression ) ;
595+
594596 return `${ callPath } (${ params } )` ;
595597 }
596598
You can’t perform that action at this time.
0 commit comments