File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -791,18 +791,17 @@ export class LuaTranspiler {
791791 return this . transpileArrayCallExpression ( node ) ;
792792 }
793793
794- if ( expType . symbol && ( ( expType . symbol . flags & ts . SymbolFlags . Interface ) || ( expType . symbol . flags & ts . SymbolFlags . Class ) ) ) {
795- // Replace . with : here
796- const callPath = ` ${ this . transpileExpression ( node . expression . expression ) } : ${ node . expression . name . escapedText } ` ;
794+ if ( expType . symbol && ( expType . symbol . flags & ts . SymbolFlags . Namespace ) ) {
795+ // Don't replace . with : for namespaces
796+ const callPath = this . transpileExpression ( node . expression ) ;
797797 const params = this . transpileArguments ( node . arguments ) ;
798798 return `${ callPath } (${ params } )` ;
799799 } else {
800- const callPath = this . transpileExpression ( node . expression ) ;
800+ // Replace last . with : here
801+ const callPath = `${ this . transpileExpression ( node . expression . expression ) } :${ node . expression . name . escapedText } ` ;
801802 const params = this . transpileArguments ( node . arguments ) ;
802803 return `${ callPath } (${ params } )` ;
803804 }
804-
805-
806805 }
807806
808807 // Handle super calls properly
You can’t perform that action at this time.
0 commit comments