mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 23:14:47 +02:00
Add private fields tests of early errors and small fix
This commit is contained in:
parent
99ee383d3f
commit
5e7ae4af8f
@ -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 }*/;
|
||||||
|
}
|
||||||
|
|
@ -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 }*/;
|
||||||
|
}
|
@ -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 }*/;
|
||||||
|
}
|
@ -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 }*/;
|
||||||
|
}
|
@ -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 }*/;
|
||||||
|
}
|
@ -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 }*/;
|
||||||
|
}
|
@ -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 }*/;
|
||||||
|
}
|
@ -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 }*/;
|
||||||
|
}
|
@ -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 }*/;
|
||||||
|
}
|
@ -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 }*/;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user