Bug 144034

Summary: Web Inspector: cannot define an ES6 class from the console
Product: WebKit Reporter: Brian Burg <burg>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: graouts, joepeck, jonowells, mattbaker, nvasilyev, rniwa, saam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description Brian Burg 2015-04-21 20:02:08 PDT
"Class declaration is not allowed in a lexically nested statement."

We do some wrapping, which prevents this from working. It would be great if it did work. Is there an easy fix?
Comment 1 Radar WebKit Bug Importer 2015-04-21 20:02:39 PDT
<rdar://problem/20645742>
Comment 2 Timothy Hatcher 2015-04-22 07:43:32 PDT

*** This bug has been marked as a duplicate of bug 141737 ***
Comment 3 Joseph Pecoraro 2015-04-22 13:28:12 PDT
FWIW the workaround is to assign:

  js> MyClass = class MyClass { };
Comment 4 Joseph Pecoraro 2015-12-15 18:34:13 PST
Lets reopen this, as we are handling the Object case separately.
Comment 5 Joseph Pecoraro 2016-05-05 22:29:39 PDT
Forward duping to the more generic bug about `let` and `const` in the Console.

Bug 150752.

*** This bug has been marked as a duplicate of bug 150752 ***