diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 1f92256a33..d5cdd898c2 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -5235,6 +5235,33 @@ Parser::checkExportedName(JSAtom* exportName) return false; } +// Because all these template methods call each other, let's declare them first before +// defining them to prevent a GCC compiler error in specialization of member function +// template after instantiation. +template<> +bool +Parser::checkExportedNamesForDeclaration(ParseNode* node); + +template<> +bool +Parser::checkExportedNamesForDeclaration(Node node); + +template<> +bool +Parser::checkExportedNamesForArrayBinding(ListNode* array); + +template<> +inline bool +Parser::checkExportedNamesForArrayBinding(ListNodeType array); + +template<> +bool +Parser::checkExportedNamesForObjectBinding(ListNode* obj); + +template<> +inline bool +Parser::checkExportedNamesForObjectBinding(ListNodeType obj); + template<> bool Parser::checkExportedNamesForArrayBinding(ListNode* array)