test262/test/language/expressions/object/method-definition/generator-super-call-body.js
Mike Pennisi 81d00def42 Force "early error" tests to fail if evaluated
This pattern makes expectations more explicit by making test files more
literal.
2017-06-28 11:24:36 -04:00

24 lines
470 B
JavaScript

// Copyright 2015 Cubane Canada, Inc. All rights reserved.
// See LICENSE for details.
/*---
info: >
GeneratorMethod early SyntaxError when super is called
directly inside generator body
features: [generators]
es6id: 14.4.1
author: Sam Mikes
description: GeneratorMethod error if HasDirectSuper in body
negative:
phase: early
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
var obj = {
*foo(a) {
super();
}
};