mteb/BrightProStackoverflowRetrieval huggingface dataset:
67. [ TypeError: can't convert BigInt to number ](/en-US/docs/Web/JavaScript/Reference/Errors/Cant_convert_BigInt_to_number)
68. [ TypeError: can't convert x to BigInt ](/en-US/docs/Web/JavaScript/Reference/Errors/Cant_convert_x_to_BigInt)
69. [ TypeError: can't define property "x": "obj" is not extensible ](/en-US/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible)
70. [ TypeError: can't delete non-configurable array element ](/en-US/docs/Web/JavaScript/Reference/Errors/Non_configurable_array_element)
71. [ TypeError: can't redefine non-configurable property "x" ](/en-US/docs/Web/JavaScript/Reference/Errors/Cant_redefine_property)
72. [ TypeError: can't set prototype: it would cause a prototype chain cycle ](/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_prototype)
73. [ TypeError: cannot use 'in' operator to search for 'x' in 'y' ](/en-US/docs/Web/JavaScript/Reference/Errors/in_operator_no_object)
74. [ TypeError: cyclic object value ](/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value)
75. [ TypeError: invalid 'instanceof' operand 'x' ](/en-US/docs/Web/JavaScript/Reference/Errors/invalid_right_hand_side_instanceof_operand)
76. [ TypeError: invalid Array.prototype.sort argument ](/en-US/docs/Web/JavaScript/Reference/Errors/Array_sort_argument)
77. [ TypeError: invalid assignment to const "x" ](/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_const_assignment)
78. [ TypeError: More arguments needed ](/en-US/docs/Web/JavaScript/Reference/Errors/More_arguments_needed)
79. [ TypeError: property "x" is non-configurable and can't be deleted ](/en-US/docs/Web/JavaScript/Reference/Errors/Cant_delete)
80. [ TypeError: Reduce of empty array with no initial value ](/en-US/docs/Web/JavaScript/Reference/Errors/Reduce_of_empty_array_with_no_initial_value)
81. [ TypeError: setting getter-only property "x" ](/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only)
82. [ TypeError: X.prototype.y called on incompatible type ](/en-US/docs/Web/JavaScript/Reference/Errors/Called_on_incompatible_type)
83. [ URIError: malformed URI sequence ](/en-US/docs/Web/JavaScript/Reference/Errors/Malformed_URI)
84. [ Warning: -file- is being assigned a //# sourceMappingURL, but already has one ](/en-US/docs/Web/JavaScript/Reference/Errors/Already_has_pragma)
85. [ Warning: unreachable code after return statement ](/en-US/docs/Web/JavaScript/Reference/Errors/Stmt_after_return)
15. Misc
1. [ JavaScript technologies overview ](/en-US/docs/Web/JavaScript/JavaScript_technologies_overview)
2. [ Lexical grammar ](/en-US/docs/Web/JavaScript/Reference/Lexical_grammar)
3. [ Iteration protocols ](/en-US/docs/Web/JavaScript/Reference/Iteration_protocols)
4. [ Strict mode ](/en-US/docs/Web/JavaScript/Reference/Strict_mode)
5. [ Template literals ](/en-US/docs/Web/JavaScript/Reference/Template_literals)
6. [ Trailing commas ](/en-US/docs/Web/JavaScript/Reference/Trailing_commas)
7. [ Deprecated features ](/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features)
web%2Fjavascript%2Freference%2Fglobal_objects%2Fregexp%2Fexec%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-
US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FRegExp%2Fexec%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-
us%2Fweb%2Fjavascript%2Freference%2Fglobal_objects%2Fregexp%2Fexec%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2Ffb85334ffa4a2c88d209b1074909bee0e0abd57a%0A*+Document+last+modified%3A+2023-09-25T07%3A33%3A31.000Z%0A%0A%3C%2Fdetails%3E
"This will take you to GitHub to file a new issue.")

[ MDN logo  ](/)

Your blueprint for a better internet.

  * [ MDN on Mastodon  ](https://mozilla.social/@mdn)
  * [ MDN on X (formerly Twitter)  ](https://twitter.com/mozdevnet)
  * [ MDN on GitHub  ](https://github.com/mdn/)
  * [ MDN Blog RSS Feed  ](/en-US/blog/rss.xml)

##  MDN

  * [ About ](/en-US/about)
  * [ Blog ](/en-US/blog/)
  * [ Careers ](https://www.mozilla.org/en-US/careers/listings/?team=ProdOps)
  * [ Advertise with us ](/en-US/advertising)

##  Support

  * [ Product help ](https://support.mozilla.org/products/mdn-plus)
  * [ Report an issue ](/en-US/docs/MDN/Community/Issues)

##  Our communities

  * [ MDN Community ](/en-US/community)
  * [ MDN Forum ](https://discourse.mozilla.org/c/mdn/236)
  * [ MDN Chat ](/discord)

##  Developers

  * [ Web Technologies ](/en-US/docs/Web)
  * [ Learn Web Development ](/en-US/docs/Learn)
  * [ MDN Plus ](/en-US/plus)
  * [ Hacks Blog ](https://hacks.mozilla.org/)

[ Mozilla logo  ](https://www.mozilla.org/)

  * [ Website Privacy Notice ](https://www.mozilla.org/privacy/websites/)
  * [ Cookies ](https://www.mozilla.org/privacy/websites/#cookies)
  * [ Legal ](https://www.mozilla.org/about/legal/terms/mozilla)
  * [ Community Participation Guidelines ](https://www.mozilla.org/about/governance/policies/participation/)

Visit  [ Mozilla Corporationâs ](https://www.mozilla.org) not-for-profit
parent, the  [ Mozilla Foundation ](https://foundation.mozilla.org/) .  
Portions of this content are Â©1998â  2024  by individual mozilla.org
contributors. Content available under  [ a Creative Commons license ](/en-
US/docs/MDN/Writing_guidelines/Attrib_copyright_license) .

  *[
                
                 Deprecated
                
               ]: Deprecated. Not for use in new websites.
  *[
                
                 Non-standard
                
               ]: Non-standard. Check cross-browser support before using.
14. [ for ](/en-US/docs/Web/JavaScript/Reference/Statements/for)
15. [ for await...of ](/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of)
16. [ for...in ](/en-US/docs/Web/JavaScript/Reference/Statements/for...in)
17. [ for...of ](/en-US/docs/Web/JavaScript/Reference/Statements/for...of)
18. [ function ](/en-US/docs/Web/JavaScript/Reference/Statements/function)
19. [ function* ](/en-US/docs/Web/JavaScript/Reference/Statements/function*)
20. [ if...else ](/en-US/docs/Web/JavaScript/Reference/Statements/if...else)
21. [ import ](/en-US/docs/Web/JavaScript/Reference/Statements/import)
22. [ Labeled statement ](/en-US/docs/Web/JavaScript/Reference/Statements/label)
23. [ let ](/en-US/docs/Web/JavaScript/Reference/Statements/let)
24. [ return ](/en-US/docs/Web/JavaScript/Reference/Statements/return)
25. [ switch ](/en-US/docs/Web/JavaScript/Reference/Statements/switch)
26. [ throw ](/en-US/docs/Web/JavaScript/Reference/Statements/throw)
27. [ try...catch ](/en-US/docs/Web/JavaScript/Reference/Statements/try...catch)
28. [ var ](/en-US/docs/Web/JavaScript/Reference/Statements/var)
29. [ while ](/en-US/docs/Web/JavaScript/Reference/Statements/while)
30. [ with ](/en-US/docs/Web/JavaScript/Reference/Statements/with) Deprecated
11. Functions
1. [ Overview ](/en-US/docs/Web/JavaScript/Reference/Functions)
2. [ Arrow function expressions ](/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)
3. [ Default parameters ](/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters)
4. [ get ](/en-US/docs/Web/JavaScript/Reference/Functions/get)
5. [ Method definitions ](/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions)
6. [ Rest parameters ](/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters)
7. [ set ](/en-US/docs/Web/JavaScript/Reference/Functions/set)
8. [ The arguments object ](/en-US/docs/Web/JavaScript/Reference/Functions/arguments)
12. Classes
1. [ Overview ](/en-US/docs/Web/JavaScript/Reference/Classes)
2. [ constructor ](/en-US/docs/Web/JavaScript/Reference/Classes/constructor)
3. [ extends ](/en-US/docs/Web/JavaScript/Reference/Classes/extends)
4. [ Private properties ](/en-US/docs/Web/JavaScript/Reference/Classes/Private_properties)
5. [ Public class fields ](/en-US/docs/Web/JavaScript/Reference/Classes/Public_class_fields)
6. [ static ](/en-US/docs/Web/JavaScript/Reference/Classes/static)
7. [ Static initialization blocks ](/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks)
13. Regular expressions
1. [ Overview ](/en-US/docs/Web/JavaScript/Reference/Regular_expressions)
2. [ Backreference: \1, \2 ](/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Backreference)
3. [ Capturing group: (...) ](/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Capturing_group)
4. [ Character class escape: \d, \D, \w, \W, \s, \S ](/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Character_class_escape)
5. [ Character class: [...], [^...] ](/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Character_class)
Community/Issues)

##  Our communities

  * [ MDN Community ](/en-US/community)
  * [ MDN Forum ](https://discourse.mozilla.org/c/mdn/236)
  * [ MDN Chat ](/discord)

##  Developers

  * [ Web Technologies ](/en-US/docs/Web)
  * [ Learn Web Development ](/en-US/docs/Learn)
  * [ MDN Plus ](/en-US/plus)
  * [ Hacks Blog ](https://hacks.mozilla.org/)

[ Mozilla logo  ](https://www.mozilla.org/)

  * [ Website Privacy Notice ](https://www.mozilla.org/privacy/websites/)
  * [ Cookies ](https://www.mozilla.org/privacy/websites/#cookies)
  * [ Legal ](https://www.mozilla.org/about/legal/terms/mozilla)
  * [ Community Participation Guidelines ](https://www.mozilla.org/about/governance/policies/participation/)

Visit  [ Mozilla Corporationâs ](https://www.mozilla.org) not-for-profit
parent, the  [ Mozilla Foundation ](https://foundation.mozilla.org/) .  
Portions of this content are Â©1998â  2024  by individual mozilla.org
contributors. Content available under  [ a Creative Commons license ](/en-
US/docs/MDN/Writing_guidelines/Attrib_copyright_license) .

  *[
                
                 Deprecated
                
               ]: Deprecated. Not for use in new websites.
  *[
                
                 Non-standard
                
               ]: Non-standard. Check cross-browser support before using.
* [ Log in ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FRegExp%2Fexec)
* [ Sign up for free  ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FRegExp%2Fexec)
* [ EspaÃ±ol  ](/es/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString)
* [ FranÃ§ais  ](/fr/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString)
* [ æ¥æ¬èª  ](/ja/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString)
* [ PortuguÃªs (doÂ Brasil)  ](/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString)
* [ Ð ÑÑÑÐºÐ¸Ð¹  ](/ru/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString)
* [ ä¸­æ (ç®ä½)  ](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString)
* [ Log in ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FRegExp%2FtoString)
* [ Sign up for free  ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FRegExp%2FtoString)
* [ Log in ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FGuide%2FRegular_expressions)
* [ Sign up for free  ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FGuide%2FRegular_expressions)
"The machine you are building on. That's the value you passed to ./configure --build.") |   
[ Known to work: ](page.cgi?id=fields.html#cf_known_to_work "Known versions for which the issue is not reproducible.") |   
[ Known to fail: ](page.cgi?id=fields.html#cf_known_to_fail "Known versions for which the issue is reproducible.") |   
[ Last reconfirmed: ](page.cgi?id=fields.html#cf_reconfirmed_on "Last time the issue was confirmed as still being present.") |  2022-12-01 00:00:00   
  
* * *  
  
  
|  Attachments  
---  
[ Add an attachment ](attachment.cgi?bugid=107945&action=enter) (proposed
patch, testcase, etc.)  
  

Note  You need to [ log in ](show_bug.cgi?id=107945&GoAheadAndLogIn=1) before
you can comment on or make changes to this bug.  
---  
  
[ Description ](show_bug.cgi?id=107945#c0) Jason Liam  2022-12-01 13:20:05 UTC

    
    
    The following invalid program is accepted by gcc but rejected by clang and msvc. <https://godbolt.org/z/WGz3f75da>
    
    ```
    struct incomplete;
    template<typename T> struct C
    {
        static constexpr T t{};
    };
    
    template<class T>
    struct myClass {
        C<T> new_t() { return {}; }
    };
    
    int main() {
        myClass<incomplete> d;
        d.new_t();    
    }
    ```

[ Comment 1 ](show_bug.cgi?id=107945#c1) Andrew Pinski  2022-12-01 20:09:31
UTC

    
    
    Reduced:
    ```
    struct incomplete;
    template<typename T> struct C
    {
        static constexpr T t{};
    };
    
    
    int main() {
        C<incomplete> t;
       // t.t;
    }
    ```
    If we uncomment t.t, then GCC will reject it.

[ Comment 2 ](show_bug.cgi?id=107945#c2) Andrew Pinski  2022-12-01 20:10:22
UTC

    
    
    ICC has the same behavior as GCC, though I don't know if it was EDG marking this as an extension or not.

[ Comment 3 ](show_bug.cgi?id=107945#c3) Andrew Pinski  2022-12-01 20:13:42
UTC

    
    
    If we make the field not depedent then GCC rejects it:
    ```
    struct incomplete;
    template<typename T>
    struct C
    {
        static constexpr incomplete t{};
    };
    ```
    
    Confirmed.

|  
---|---  
  
* * *

  * [ Format For Printing ](show_bug.cgi?format=multiple&id=107945)
  * \- [ XML ](show_bug.cgi?ctype=xml&id=107945)
  * \- [ Clone This Bug ](enter_bug.cgi?cloned_bug_id=107945)
  * \-  Top of page 

  

  *     * [ Home ](./)
    * |  [ New ](enter_bug.cgi?product=gcc)
    * |  [ Browse ](describecomponents.cgi)
    * |  [ Search ](query.cgi)
    * |  [ [?] ](page.cgi?id=quicksearch.html "Quicksearch Help")
    * |  [ Reports ](report.cgi)
    *     * |  [ Help ](https://bugzilla.readthedocs.org/en/5.0/using/understanding.html)
    * |  [ New Account ](createaccount.cgi)
    * |  [ Log In ](show_bug.cgi?id=107945&GoAheadAndLogIn=1) Remember  [x] 
    * |  [ Forgot Password ](show_bug.cgi?id=107945&GoAheadAndLogIn=1#forgot) Login:  [x]