Add private fields tests of early errors and small fix

This commit is contained in:
Valerie R Young 2017-10-18 15:24:39 -04:00
parent 99ee383d3f
commit 5e7ae4af8f
11 changed files with 143 additions and 0 deletions

View File

@ -0,0 +1,16 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-private-arrow-fnc-
name: private field, arrow function expression
features: [arrow-function]
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = () => /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-private-literal-name-
name: ClassElementName PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-private-ternary-
name: private field, ternary expression
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = false ? {} : /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-private-typeof-
name: private field, typeof expression
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = typeof /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-static-private-
name: static PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static #x = /*{ initializer }*/;
}

View File

@ -0,0 +1,15 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-private-arrow-fnc-
name: private field, arrow function expression
features: [arrow-function]
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = () => /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-private-literal-name-
name: ClassElementName PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-private-ternary-
name: private field, ternary expression
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = true ? {} : /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-private-typeof-
name: private field, typeof expression
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = typeof /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-static-private-
name: static PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static #x = /*{ initializer }*/;
}