v8/test/mjsunit/harmony/classes-lazy-parsing.js
arv 765e002a4f Fix lazy parsing for functions that use super.
The preparser needs to log the usage of super properties and then update
the scope when we create the function later.

BUG=v8:3888
LOG=N
R=dslomov@chromium.org, marja

Review URL: https://codereview.chromium.org/923683002

Cr-Commit-Position: refs/heads/master@{#26642}
2015-02-13 18:35:09 +00:00

22 lines
382 B
JavaScript

// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-classes --min-preparse-length=0
'use strict';
class Base {
m() {
return 42;
}
}
class Derived extends Base {
m() {
return super.m();
}
}
assertEquals(42, new Derived().m());