Skip to content
Snippets Groups Projects
Commit 5e7ae4af authored by Valerie R Young's avatar Valerie R Young
Browse files

Add private fields tests of early errors and small fix

parent 99ee383d
No related branches found
No related tags found
No related merge requests found
Showing
with 143 additions and 0 deletions
// 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 }*/;
}
// 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 }*/;
}
// 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 }*/;
}
// 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 }*/;
}
// 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 }*/;
}
// 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 }*/;
}
// 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 }*/;
}
// 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 }*/;
}
// 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 }*/;
}
// 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 }*/;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment